How should the GNU linker treat weak references?

Ulrich Drepper drepper@redhat.com
Thu Jul 5 01:06:00 GMT 2001


Alan Modra <amodra@bigpond.net.au> writes:

> Can you enlighten us as to why you think that particular implementation
> is wrong?  As you say, the elf spec "is very very weak in this area"
> Actually, more than that, it doesn't say _anything_ about this area
> apart from "The behavior of weak symbols in areas not specified by this
> document is implementation defined."

Well, it's very simple.  We talked about this very issue in the ELF
working group and the people who came up with the whole concept
explained how it has to be (the way I described and different from
what we have).  Only SGI and we have the same (at least similar)
implementation, everybody else does it the way the SysV linker does
it.

It is actually important to get this fixed since some optimizations
(like lazy loading) cannot be implemented otherwise.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



More information about the Binutils mailing list