[Bug lto/93966] [9/10 Regression] -fcf-protection -flto -g don't work togeter

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 2 11:22:00 GMT 2020


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.


More information about the Gcc-bugs mailing list