[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: R_PPC_REL24 relocation out of range



On Sat, Jul 21, 2001 at 09:15:53AM -0600, Bradley C. Midgley wrote:
> this code works on x86 so i believe it's a ppc-specific problem. using
> -fPIC everywhere reduced the number of these errors but didn't eliminate
> them. (i may try rebuilding libc6 with the recommended patch to see if it
> helps)

What version of gcc are you using?  Older 2.95 versions are known
to have issues outputting R_PPC_REL24 relocs in PIC code.

Use 'readelf -r' to determine the various types of relocations in
a shared object file.  In a properly compiled PPC .so file, you
shouldn't get R_PPC_REL24, because that kind of reloc only allows
a 24 bit signed offset (+2 because instructions are aligned), thus
+/- 32 MB.  The binary and libraries are typically mapped at
0x10000000 and  0x30000000, so things like R_PPC_JMP_SLOT are used
in .so code to jump from one library to another.

It works on i386 because that architecture has 32 bit offsets.

> this thing i'm running probably really pushes everything. the memory
> footprint is about 50MB with almost everything loaded.

The in-core size is not the problem itself, but probably triggers
the problem.



dave...



Reply to: