This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR 31903, type info for types in anonymous namespaces
On 10/30/07, Andrew Pinski <pinskia@gmail.com> wrote:
> On 10/30/07, Richard Guenther <richard.guenther@gmail.com> wrote:
> > The symbols were weak before and are now not weak. readelf shows
> > after your patch:
>
> Yes and they changed from being global to being local symbols. So
> this change is correct and something else is wrong.
They are referenced from the global (but weak) vtable for s via
Relocation section '.rela.gnu.linkonce.r._ZTI1s' at offset 0xf38
contains 2 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000000000 001c00000001 R_X86_64_64 0000000000000000
_ZTVN10__cxxabiv117__c + 10
000000000008 001d00000001 R_X86_64_64 0000000000000000 _ZTS1s + 0
Relocation section '.rela.gnu.linkonce.r._ZTV1s' at offset 0xf68
contains 2 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000000008 001b00000001 R_X86_64_64 0000000000000000 _ZTI1s + 0
000000000010 001800000001 R_X86_64_64 0000000000000000 _ZN1s1mEv + 0
so the reference to the typeinfo name _ZTS1s is not locally bound?
Or maybe the linker is confused by this situation.
Richard.