AnsweredAssumed Answered

dangerous relocation: generic linker can't handle R_PPC_VLE_HA16A

Question asked by Pavel Havlik on Jan 10, 2018
Latest reply on Feb 3, 2018 by Pavel Havlik

Hello

I moved to powerpc-eabivle-4_9 toolchain of S32DS from other vendor gnu toolchain which was able to compile only BookE. I wanted to use CodeBlocks as in the previous project so I updated library and linker path and when compilation an linking are started following commands are issued:

 

(majority of switches are taken from S32DS vle project created for cpu mpc5633m)

 

compiler:

powerpc-eabivle-gcc.exe -Wall -g -fmessage-length=0 -mcpu=e200z3 -specs=nosys.specs -mbig --sysroot="C:\NXP\S32DS_Power_v2017.R1\Cross_Tools\powerpc-eabivle-4_9\powerpc-eabivle\newlib"  -DSTART_FROM_FLASH -DMPC563xM -DE200Z3    -Ic:/NXP/S32DS_Power_v2017.R1/Cross_Tools/powerpc-eabivle-4_9/include/ -Ic:/NXP/S32DS_Power_v2017.R1/Cross_Tools/powerpc-eabivle-4_9/lib/gcc/powerpc-eabivle/4.9.4/include/ -c {file-to-compile.c}  {file-to-compile.o}

 

linker:

powerpc-eabivle-gcc.exe  {a lof of *.o files...} -T "mpc5633-bldr-vle.ld" -nostartfiles -nostdlib -Wl,-Map=map.txt -Xlinker --gc-sections -mcpu=e200z3 -specs=nosys.specs --sysroot="C:\NXP\S32DS_Power_v2017.R1\Cross_Tools\powerpc-eabivle-4_9\powerpc-eabivle\newlib"  -lm -lc -lgcc

 

When linking stage starts I get a lot of following errors

 

etpu2/etpu/_utils/etpu_util.c:117:(.text+0x18): dangerous relocation: generic linker can't handle R_PPC_VLE_HA16A
etpu2/etpu/_utils/etpu_util.c:123:(.text+0x52): dangerous relocation: generic linker can't handle R_PPC_VLE_HA16A
etpu2/etpu/_utils/etpu_util.c:124:(.text+0x64): dangerous relocation: generic linker can't handle R_PPC_VLE_HA16A

 

I suppose linker is able to link vle code including vle relocation. So I don't understand why the problem arises.

Could anybody help to fix the problem?

 

Thank you

Outcomes