[PATCH] Use only needed weak prototypes
Jakub Jelinek
jakub@redhat.com
Mon Oct 29 05:59:00 GMT 2001
On Fri, Oct 26, 2001 at 09:55:17AM -0700, Richard Henderson wrote:
> On Fri, Oct 26, 2001 at 11:01:03AM +0200, Jakub Jelinek wrote:
> > Every weak prototype, even if it is not used at all, adds an entry to
> > .dynsym and symbol name to .dynstr...
>
> Seems like this is something that ought to get fixed in
> the assembler. We shouldn't add the symbol to the table
> unless it is used elsewhere.
I've just checked Sun as and it works the same way (ie.
.weak foo
.weak bar
.word foo
will result in WEAK UNDEF foo and bar symbols).
On the other side, linker if it finds both WEAK and non-WEAK UNDEF symbol of
the same name merges them into non-WEAK UNDEF, so changing it in as should
not cause problems.
Jakub
More information about the Binutils
mailing list