This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Handle weak symbols
Mark Mitchell <mark@codesourcery.com> writes:
[...]
> Thanks for the test-case. Unfortunately, on x86-linux I seem to get
> code with a test in it when I compile with -O2:
Try it e.g. on PowerPC, x86 is so far unaffected from this.
> Is there another way that glibc could do its job without using this
> construct? That would allow us not to put these changes into GCC 3.0.
Not that I'm aware of. The construct
extern void *__dso_handle __attribute__((weak));
...
&__dso_handle = NULL ? NULL : __dso_handle
is the normal way to handle weak symbols if they are allowed to be
undefined.
> At this point, we're trying to avoid everything we can. If this is
> only a development version -- as opposed to released version -- of
> glibc, I'd rather see glibc work around the bug.
The bug manifests in the latest released glibc. But similar code is
used in all glibc releases.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj