This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Get rid of weak symbols in static objects
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