This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: why is g++ relocation error linking only showing when listing objects explicitly?


On 12/21/2012 02:57 PM, Mark Galeck (CW) wrote:
> OK.  Thank you for help
> 
>> ls -l foobar.a
> -rw-r--r-- 1 mgaleck 140132266 Dec 21 06:10 foobar.a
> 
>> g++ -shared -fPIC -mlongcall -Wl,--whole-archive foobar.a
> 
> (...)
> crtbeginS.o: In function `__do_global_dtors_aux':
> crtstuff.c:(.text+0x54): relocation truncated to fit: R_PPC_PLTREL24 against symbol `__cxa_finalize@@GLIBC_2.1.3' defined in .text section in (...)/libc.so.6+8000
> 
>> objdump --reloc foobar.a | grep cxa_finalize
>> objdump --reloc foobar.a | grep dtors_aux
>>
> 
> 
> ??  what do you want me to call objdump --reloc with??

Aha!  The error is in crtbeginS.o.  This is important: it is not one
of the files you compiled.  Therefore, no matter what you do with
-mlongcall", it won't help.  It may be that recompiling crtbeginS.o with

-mlongcall" would help, but we'd need a PPC export to confirm that.

It may be easier simply to split the shared library.

Andrew.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]