This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix weak handling with GCC 3.4+


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 `---------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]