Avoid GCC 4.7 optimization in elf/soinit.c
Richard Guenther
rguenther@suse.de
Tue Sep 27 14:19:00 GMT 2011
On Tue, 27 Sep 2011, Andreas Schwab wrote:
> Andreas Jaeger <aj@suse.de> writes:
>
> > We recently got a bug report and analysis showed that gcc 4.7 optimized
> > __libc_fini and __libc_global_ctors to empty functions since it checked the
> > size of __CTOR_LIST__ and does not know that glibc changes the size at link
> > time.
> >
> > Bug report is:
> > https://bugzilla.novell.com/show_bug.cgi?id=717671
> >
> > I'm appending a patch that fixes the problem,
>
> A better approach is perhaps to make __[CD]TOR_LIST__ volatile.
That would not disable deriving loop trip counts from the array
size we see (not that we do this at the moment).
Richard.
--
Richard Guenther <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
More information about the Libc-alpha
mailing list