This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


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

Re: An ELF linker bug?


   From: hjl@nynexst.com (H.J. Lu)
   Date: Sun, 10 Sep 1995 21:33:01 -0400 (EDT)

   Here is a simple test. "f1" should print out "foo". Under UnixWare,
   it worked fine. But gas-950822 failed to pick up the strong "foo".
   Also Solaris 2.3 got it wrong.

I think this case is undefined.  You are defining a symbol twice in an
archive.  It does not matter that one definition is weak and one is
normal.  A weak definition is pulled in from an archive just as a
normal one is.  This case is equivalent to defining the same symbol in
two different object files and including them both in an archive: you
can not predict which object file will be included in the final link.

Ian