This is the mail archive of the gcc@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]

R_PPC_REL24 overflow


I'm confused...
While working with tools for a PowerPC 8xx I've run into a problem
loading SO's:
/bin/hello.x: error while loading shared libraries:
/lib/libgcc_s.so.1: R_PPC_REL24 relocation at 0x0ff6c384 for symbol
`__pthread_mutex_lock' out of range

I'm using gcc-4.0.2+ (i686-pc-linux-gnu x powerpc-823-linux) and
glibc-2.3.6.

Googling for similar problems suggests that this relocation is not used
when building with -fPIC, and that all PowerPC SO's should be built with
-fPIC.

Objdump -dR shows the reference is from gcc_personality_v0(), which is
defined in gcc/unwind-c.c.  gcc/Makefile.in creates libgcc.mk which is
used to compile unwind-c.c with -fPIC.

The generated asm makes the reference as:
bl pthread_mutex_unlock@plt      # 141  *call_value_nonlocal_sysv/1 [length = 4]

And for this, gas generates:
R_PPC_REL24      __pthread_mutex_lock

Can anyone help clarify what is / should be going on here?
Jim.

-- 
Jim Lemke   jwlemke@wasabisystems.com   Orillia, Ontario


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