This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix unique symbol production in unit-at-a-time
Andrew Pinski <pinskia@physics.uc.edu> writes:
> On Wednesday, Aug 20, 2003, at 05:18 US/Eastern, Jan Hubicka wrote:
>
> >> http://gcc.gnu.org/ml/gcc-patches/2003-08/msg00991.html
> >>
> >> This is causing a regression, g++.old-deja/g++.pt/instantiate5.C on
> >> i686-unknown-openbsd3.1.
> >> The random number is still better in this case because it looks like
> >> the identifier is not unique enough.
> > Can you please send me the assembler dumps? I have no idea how symbol
> > with same name can came out in two object files first and get no linker
> > failure.
>
> I do get a linker failure:
> /tmp//ccfj9995.o: Definition of symbol `__GLOBAL__I__Z3barv' (multiply
> defined)^M
> /tmp//ccxc9995.o: Definition of symbol `__GLOBAL__I__Z3barv' (multiply
> defined)^M
> collect2: ld returned 1 exit status^M
>
> Note openbsd is not ELF on i386 so there is no .ctors section.
> Here the assembler dumps of the two files, instantiate5.C and
> instantiate5.cc:
...
The problem is that __Z3barv is weak, but it's being used in the name of
__GLOBAL__I__Z3barv which is not weak.
--
- Geoffrey Keating <geoffk@geoffk.org>