bfd assertion failed with gcc 950607

H.J. Lu hjl@nynexst.com
Wed Jun 14 14:26:00 GMT 1995


> 
> > > 
> > > 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




More information about the Gas2 mailing list