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


>>>>> "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)."

Alan> I pointed out in another email that changing the symbol type
Alan> and/or section loses information.

  Weak "attribute" is meaningful only for the link process.  In an
object, which will not undergo linking, weak "attribute" is
meaningless, i.e. it is not information, but junk.  Thus, no
information is lost.

~velco


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