This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Fix weak handling with GCC 3.4+
- From: Ulrich Drepper <drepper at redhat dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 03 Jan 2003 14:34:50 -0800
- Subject: Re: Fix weak handling with GCC 3.4+
- Organization: Red Hat, Inc.
- References: <u84r8qtski.fsf@gromit.moeb>
Andreas Jaeger wrote:
> As discussed yesterday, GCC 3.4 needs to be aware of weak symbols.
> I'm appending a patch that solves all problems I noticed.
The patch is partly OK and I've checked in the parts. But the main part
> * include/libc-symbols.h (weak_extern): Use weak attribute instead
> of assembler so that GCC knows about it.
is broken. The problem is this:
__thread int foo = 0;
extern __typeof (foo) foo __attribute ((weak));
__typeof() apparently does not include the __thread information. I'd
call it a gcc bug. This means:
a) we cannot use the new code unconditionally
b) gcc first has to be fixed before we can use a patch like this
--
--------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------