Unknown relocation type 182, 183

Nick Clifton nickc@redhat.com
Mon Aug 9 15:04:00 GMT 2004


Hi David,

> and linked using gcc-3.4.0 we get the following error from the linker:
> powerpc-eabi-ld: /path/to/libx.a(xxx.o): unknown relocation type 182 for 
> symbol asdf

> These relocation types are registered in elf.h as
> /* Diab tool relocations.  */
> #define R_PPC_DIAB_SDA21_HA     182     /* like EMB_SDA21, adjusted high 
> 16 */

(I assume that you are referring to the file /usr/include/elf.h)  That 
is a Linux system header file, not a binutils file.  The relocations 
known by the linker (for the PowerPC) are defined in 
<binutils-sources>/include/elf/ppc.h.

> so they are known. Are they not implemented in ld?

No.

> Is our cross compile tool chain wrongly configured (host i686-linux, 
> target powerpc-eabi)?
> Is this a bug?

No it is a lack of support for the Diab compiler.  The current binutils 
linker sources do not support these relocations.  Unfortunately this 
leaves you with only a few of choices:

   1. Do not use the files that contain these relocations.
   2. Obtain the sources for the files that contain these relocations 
and recompile them using GCC.
   3. Find out what these relocations do (presumably from the 
documentation supplied by Diab for their compiler) and then implement 
them for the GNU linker.
   4. Persuade someone else to do 3) for you.  You may have to pay to do 
this.

Cheers
   Nick



More information about the Binutils mailing list