diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2011-10-12 00:49:12 -0400 |
---|---|---|
committer | Paolo Capriotti <p.capriotti@gmail.com> | 2012-03-30 11:08:46 +0100 |
commit | b22501b408ddb0503a06a188b06d9cff9be697cd (patch) | |
tree | 9904e5262dfbacb3a804afa8fa828be5486cf5bd /rts/LinkerInternals.h | |
parent | fe0a45ef706f09a6ced55b457c38c9b96f01711f (diff) | |
download | haskell-b22501b408ddb0503a06a188b06d9cff9be697cd.tar.gz |
Add linker support for ELF on ARM
Add support for ELF objects on ARM to the runtime linker. While the list of
relocation types in the "ELF for the ARM Architecture" specification spans four
pages, we thankfully only see a handful of these in the wild. Thus, at the
moment we only support the following .rel relocation types,
* R_ARM_ABS32
* R_ARM_TARGET1
* R_ARM_REL32
* R_ARM_CALL
* R_ARM_JUMP24
* R_ARM_MOVT_ABS
* R_ARM_MOVW_ABS_NC
* R_ARM_THM_CALL
* R_ARM_THM_JUMP24
* R_ARM_THM_MOVT_ABS
* R_ARM_THM_MOVW_ABS_NC
* R_ARM_THM_JUMP8
* R_ARM_THM_JUMP11
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r-- | rts/LinkerInternals.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index dd4d7ed939..864e0d1f2f 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -40,7 +40,7 @@ typedef ProddableBlock; /* Jump Islands are sniplets of machine code required for relative - * address relocations on the PowerPC. + * address relocations on the PowerPC, x86_64 and ARM. */ typedef struct { #ifdef powerpc_HOST_ARCH @@ -53,6 +53,8 @@ typedef struct { #elif x86_64_HOST_ARCH uint64_t addr; uint8_t jumpIsland[6]; +#elif arm_HOST_ARCH + uint8_t jumpIsland[16]; #endif } SymbolExtra; @@ -104,7 +106,7 @@ typedef struct _ObjectCode { unsigned int pltIndex; #endif -#if powerpc_HOST_ARCH || x86_64_HOST_ARCH +#if powerpc_HOST_ARCH || x86_64_HOST_ARCH || arm_HOST_ARCH SymbolExtra *symbol_extras; unsigned long first_symbol_extra; unsigned long n_symbol_extras; |