This is the mail archive of the 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: 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/ R_PPC_REL24 relocation at 0x0ffd5ca4 
>>for symbol `_Jv_RegisterClasses' out of range
>Could you please do
># readelf -a  | grep _Jv_RegisterClasses
>Something is wrong with your

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.



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