[Bug middle-end/51255] Using -fwhole-program breaks code which puts values in .ctors or .init_array
carlos at redhat dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 20 03:44:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51255
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #7 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Krisztian Kocsis from comment #6)
> I currently know that glibc uses it but don't know who else use it.
> In my projects I always use constructor/destructor attributes because with
> them I can control the exection order.
Internally glibc uses attribute used to mark any special .init_array sections
as used. It is only in our configure check and some tests that we don't use the
used attribute (bug in glibc). Building the library with -fwhole-program has
never been tested and likely won't succeed without a lot of additional work.
More information about the Gcc-bugs
mailing list