Hi, I think I have seen this when I was resolving a symbol from a shared library using a definition in a static library. I think I bumped into this while trying to get a 4.1.2 rpm to build 32/64 bit multi-lib compiler correctly. I had problems getting some of the internal libraries correct. Either they ended up in the wrong location or what was supposed to be a 32 bit library was a 64 bit. This caused the linker to fail to use the shared library. It then fell back on the static. Resulting in the dreaded relocation error. Try linking with -v to double check what you are linking in. Also might try ldd on the executable. kevin On 2/16/11, Stefano Bonifazi <stefboombastic@xxxxxxxxx> wrote: > Hi! > I am working on a project using powerpc binaries I create myself. > I am creating the binaries using Debian 6 kernel 2.6.32.5 powerpc > running in a qemu VM, with gcc 4.4.5-8, binutils 2.20.1 eglibc 2.11.2-10 > My binaries are someway special being compiled with -fPIC and linked > with -pie (gcc -Wl,-pie) as I need full relocatable PIC executables. > These binaries are in fact loaded by qemu-user in different addresses. > My project (open source, as it is a university project) works fine when > I do not use libgcc (using gcc -nostartfiles) for creating my powerpc > executable, but it is impossible to build useful binaries without using it. > When I compile without "-nostartfiles", having libgcc added to my binary > I get the following error at runtime: > Hi! > Sorry I am not very sure if this is the right mailing list for posting > my problem, I've got the address from an old thread about the same kind > of problem. > I am working on a project using powerpc binaries I create myself. > I am creating the binaries using Debian 6 kernel 2.6.32.5 powerpc > running in a qemu VM, with gcc 4.4.5-8, binutils 2.20.1 eglibc 2.11.2-10 > My binaries are someway special being compiled with -fPIC and linked > with -pie (gcc -Wl,-pie) as I need full relocatable PIC executables. > These binaries are in fact loaded by qemu-user in different addresses. > My project (open source, as it is a university project) works fine when > I do not use libgcc (using gcc -nostartfiles) for creating my powerpc > executable, but it is impossible to build useful binaries without using it. > When I compile without "-nostartfiles", having libgcc added to my binary > I get the following error at runtime: > > > R_PPC_REL24 relocation [...] __libc_start_main' out of range > > > I tried to link my binaries as static but I get the following: > > > > R_PPC_REL24 relocation at ... for symbol __nptl_deallocate_tsd out > of range > > (I do not use threads though!) > > In some old thread I read it is related to non PIC code being linked > together with PIC code. But the code producing the problem seems libgcc. > > Is there a way for fixing this problem? Is there anybody able of explain > fine what happens? > I have got a very strict deadline, but I can't understand fine what the > problem is, I keep trying to install different debian versions hoping > they would fix it.. > Thank you very much in advance! > Stefano B. > > R_PPC_REL24 relocation [...] __libc_start_main' out of range > > > I tried to link my binaries as static but I get the following: > > > > R_PPC_REL24 relocation at ... for symbol __nptl_deallocate_tsd out > of range > > In some old thread I read it is related to non PIC code being linked > together with PIC code. But the code producing the problem seems libgcc. > > Is there a way for fixing this problem? Is there anybody able of explain > fine what happens? > I have got a very strict deadline, but I can't understand fine what the > problem is for doing any step forward, I keep trying to install > different debian versions hoping they would fix it.. > Thank you very much in advance! > Stefano B. > >