[PRELIMINARY PATCH] rts/Linker.c for ARM

Karel Gardas karel.gardas at centrum.cz
Wed Oct 12 20:25:30 CEST 2011


On 10/12/11 07:57 PM, Ben Gamari wrote:
>> the system is Ubuntu 11.04. Looking into /usr/include/elf.h reveals no
>> R_ARM_THM_MOVW_ABS_NC nor R_ARM_THM_MOVT_ABS relocations defined.
>>
> Oh my, it seems you are right. This is quite strange as these are
> defined in the "ELF for the ARM Architecture" specification. Moreover
> objdump seems to know about them. For now I've hacked around the issue
> by #defining them in Linker.c. I'll have to look into this futher,
> however.

I'm afraid this is a libc6-dev package bug, i.e. eglibc bug. They should 
update the elf.h file to include all ARM defined relocations. In the 
meantime your workaround is probably the only way to go forward but you 
should properly check if the rellocation is already defined or not 
otherwise you will probably get either warning or error about symbol 
redefinition once the eglibc's elf.h is fixed.

Thanks,
Karel



More information about the Cvs-ghc mailing list