Get rid of weak symbols in static objects
Ian Lance Taylor
ian@wasabisystems.com
Wed Nov 26 14:20:00 GMT 2003
Momchil Velikov <velco@fadata.bg> writes:
> >>>>> "Alan" == Alan Modra <amodra@bigpond.net.au> writes:
>
> Alan> On Wed, Nov 26, 2003 at 12:22:34PM +0200, Momchil Velikov wrote:
> >> * elflink.h (elf_link_output_extsym): Do not output weak symbols
> >> in statically linked objects.
>
> Alan> Also not OK. What is wrong with leaving the symbols as they are
> Alan> currently?
>
> I find useful to maintain the following invariant:
>
> "Statically linked executables do not contain undefined symbols
> (unless --noinhibit-exec is given)."
Why is that useful?
>From my point of view a weak undefined symbol which never sees a
definition really is undefined. The linker resolves it as though it
has the value zero, but the linker never defines it in the usual
sense.
Ian
More information about the Binutils
mailing list