GNU-ld behaviour does not match native linker behaviour

Ian Lance Taylor ian@zembu.com
Fri Dec 10 12:05:00 GMT 1999


   Date: Fri, 10 Dec 1999 11:55:34 -0800
   From: Nick Clifton <nickc@cygnus.com>

     OK here is a revised version of my original patch to fix this
     problem.  This patch is much more conservative.  It just fixes the
     ELF linker so that if it encounters a symbol in an archive map which
     matches a symbol which is currently known to be common, the linker
     will then examine the archive element's symbol table in order to
     determine oif the element contains an actual definition of the
     symbol or just another common declaration of it.

     OK to apply ?

   Cheers
	   Nick

   1999-12-10  Nick Clifton  <nickc@cygnus.com>

	   * elflink.h (elf_link_is_defined_archive_symbol): New
	   function: Decide if a symbol, in an archive map is there
	   because it is defined in the archive element, or because it is
	   just another common declaration of it.
	   (elf_link_add_archive_symbols): Use
	   elf_link_is_defined_archive_symbol to decide if an archive
	   element contain a reference to a common symbol should be
	   linked in or not.

The approach seems reasonably safe, after all of our discussion.

Ian


More information about the Binutils mailing list