From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@nynexst.com (H.J. Lu) To: roland@gnu.ai.mit.edu (Roland McGrath) Cc: gas2@cygnus.com Subject: Re: bfd assertion failed with gcc 950607 Date: Wed, 14 Jun 1995 14:26:00 -0000 Message-id: <9506142119.AA19611@titanic.nynexst.com> References: <199506141651.MAA09865@churchy.gnu.ai.mit.edu> X-SW-Source: 1995/msg00100.html > > > > > > > I am certain that your test case is a valid program and that the references > > > to `fooo' in junk.c should resolve to the common defn in fred.c rather than > > > to `_fooo' in foo.c. > > > > No. Solaris uses `_fooo' in foo.c. The GNU ld does the samething. I take it back. The GNU ld does right thing. But it just complains about. I don't have a right fix it. I don't want to hack the code. Basically a common symbol is very tricky. Although the GNU ELF linker handles it right, BFD_ASSERT in elf32-i386.c around 625 doesn't take it into account. > > It just complains about it. > > That is contrary to the specification of the SVR4 ABI, page 4-27: > "Similarly, if a common symbol exists (i.e., a symbol whose st_shndx field > holds SHN_COMMON), the appearance of a weak symbol with the same name will > not cause an error. The link editor honors the common definition and > ignores the weak ones." > -- H.J. Lu NYNEX Science and Technology, Inc. hjl@nynexst.com