This is the mail archive of the binutils@sourceware.cygnus.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]

Re: GNU-ld behaviour does not match native linker behaviour


   Date: Thu, 2 Dec 1999 18:25:39 GMT
   From: Nick Clifton <nickc@cygnus.com>

   : You should be able to change the behaviour very easily.  In
   : elf_link_add_archive_symbols, just before the comment
   :     /* We need to include this archive member.  */
   : it checks the symbol in the archive map.  Right now it only includes
   : the archive member if the symbol is undefined.  You should be able to
   : change it to include the archive member if the symbol is common.

   Well that is what my patch does.  But the problem is that we still
   only want to include the archive element if it contains the
   *definition* of (the contents of) a common symbol, and not just
   another (common) declaration of it.  Thus the code has to open up the
   element, scan its symbol table, determine what kind of declaration of
   the symbol this is, and only then can the decision be made as to
   whether the element should be included in the link...

That is too horrible.  The bug is that ar puts common symbols in the
archive symbol table.  Check the behaviour of the Solaris ar program,
and see whether the binutils version acts the same way.

I find it hard to believe that the Solaris linker goes through these
gyrations.

Ian

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