[Bug target/55909] libtool test exposes what I think is some alignment issue in libstdc++
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 9 11:51:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55909
--- Comment #24 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-01-09 11:51:22 UTC ---
> #1 0xfffff80100490988 in __cxxabiv1::__cxa_get_globals ()
> at ../../../../libstdc++-v3/libsupc++/eh_globals.cc:63
> 63 { return get_global(); }
> (gdb) disassemble
> Dump of assembler code for function __cxxabiv1::__cxa_get_globals():
> 0xfffff80100490960 <+0>: save %sp, -176, %sp
> 0xfffff80100490964 <+4>: sethi %hi(0), %o0
> 0xfffff80100490968 <+8>: sethi %hi(0), %i0
> 0xfffff8010049096c <+12>: sethi %hi(0x18f400), %l7
> 0xfffff80100490970 <+16>: call 0xfffff8010048dce0
> <__sparc_get_pc_thunk.l7>
> 0xfffff80100490974 <+20>: add %l7, 0x290, %l7 ! 0x18f690
> 0xfffff80100490978 <+24>: add %o0, 8, %o0
> 0xfffff8010049097c <+28>: xor %i0, 0, %i0
> 0xfffff80100490980 <+32>: call 0xfffff8010061a558
> 0xfffff80100490984 <+36>: add %l7, %o0, %o0
> => 0xfffff80100490988 <+40>: add %o0, %i0, %i0
> 0xfffff8010049098c <+44>: rett %i7 + 8
> 0xfffff80100490990 <+48>: nop
Here's the disassembly for a working version of the compiler:
Dump of assembler code for function __cxxabiv1::__cxa_get_globals():
0xfffff801001ea7a0 <+0>: save %sp, -176, %sp
0xfffff801001ea7a4 <+4>: sethi %hi(0xc00), %o0
0xfffff801001ea7a8 <+8>: sethi %hi(0), %i0
0xfffff801001ea7ac <+12>: sethi %hi(0x129800), %l7
0xfffff801001ea7b0 <+16>: call 0xfffff80100182e60
<__sparc_get_pc_thunk.l7>
0xfffff801001ea7b4 <+20>: add %l7, 0x50, %l7 ! 0x129850
=> 0xfffff801001ea7b8 <+24>: add %o0, 0x140, %o0
0xfffff801001ea7bc <+28>: xor %i0, 0x10, %i0
0xfffff801001ea7c0 <+32>: call 0xfffff80100317c20 <__tls_get_addr@plt>
0xfffff801001ea7c4 <+36>: add %l7, %o0, %o0
0xfffff801001ea7c8 <+40>: add %o0, %i0, %i0
0xfffff801001ea7cc <+44>: rett %i7 + 8
0xfffff801001ea7d0 <+48>: nop
So it looks like the dynamic linker screwed up the PLT on your system. I think
that you should rebuild the compiler without --enable-initfini-array.
More information about the Gcc-bugs
mailing list