https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93966
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Richard Biener from comment #3) > Isn't this a linker bug? There's no code sections in the debug object. This is a good question. > Also you need to provide -fcf-protection at compile-time as well, not > only at link-time (technically only at compile-time). Otherwise success > is not guaranteed. That is correct. > I'm not aware why it should work with GCC 8 btw. It is because GCC 8 doesn't have early LTO debug. Fixed for GCC 10 and GCC 9.3.