This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: PowerPC w/ shared libgcc: "R_PPC_REL24 relocation... out of range"


H . J . Lu wrote:

>On Fri, Nov 16, 2001 at 12:01:46AM +1300, Bryce McKinlay wrote:
>
>>I'm getting the following error when I try to run something linked 
>>against shared libgcc with current GCC:
>>
>>$ ./a.out
>>./a.out: error while loading shared libraries: 
>>/home/bryce/gcc/lib/libgcc_s.so.1: R_PPC_REL24 relocation at 0x0ffd5ca4 
>>for symbol `_Jv_RegisterClasses' out of range
>>
>
>Could you please do
>
># readelf -a libgcc_s.so.1  | grep _Jv_RegisterClasses
>
>Something is wrong with your libgcc_s.so.1.
>

OK, it turns out that crtstuff was being built without -fPIC. The reason 
is that other targets define CRTSTUFF_T_CFLAGS_S to include "-fPIC", but 
in t-ppccomm we have:

# There is no need to add -fPIC here because crtstuff is multilibbed
# and so automatically gets -fPIC when needed.
CRTSTUFF_T_CFLAGS_S = -msdata=none

... but I disabled multilib.

FWIW, I understand the need to mulitlib libgcc on ppc-linux, but it 
sucks that libstdc++ and libgcj get multilibbed by default also. The 
builds take forever and waste disk space. I'd like to turn that off by 
default if possible.

And why not have -fPIC in CRTSTUFF_T_CFLAGS_S? It won't hurt if -fPIC is 
specified twice.

regards

Bryce.



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