diff options
author | Peter Smith <peter.smith@arm.com> | 2016-06-03 19:04:03 +0100 |
---|---|---|
committer | Peter Smith <peter.smith@arm.com> | 2016-06-15 11:38:27 +0100 |
commit | f353c88470bc942a6cb443c54c6b743fb0a73a49 (patch) | |
tree | d4f174ab02a3b63b922b17d95efd9b7351eecc3d /test/ELF/Inputs/arm-thumb-narrow-branch.o | |
parent | 1dffd8feda566cdbda7e87dfc5bb3785280f0966 (diff) |
Add initial support for Thumb for ARMv7alinaro-local/InitialThumbSupport
Add support for the R_ARM_THM relocations used in the objects present
in arm-linux-gnueabihf-gcc. These are:
R_ARM_THM_CALL
R_ARM_THM_JUMP11
R_ARM_THM_JUMP19
R_ARM_THM_JUMP24
R_ARM_THM_MOVT_ABS
R_ARM_THM_MOVW_ABS_NC
Interworking between ARM and Thumb is partially supported with BLX.
The R_ARM_CALL relocation for ARM instructions and R_ARM_THM_CALL
relocation for Thumb instructions will write out a BL or BLX depending
on the state of the Target.
Assumptions:
- Availability of BLX and extended range of Thumb 4-byte Branch
instructions.
- In relocateOne if (Val & 0x1) == 1 target is Thumb, 0 is ARM.
This will hold for objects that comply with the ABI for the
ARM architecture.
This is sufficient for hello world to work with a recent
arm-linux-gnueabihf distribution.
Limitations:
No interworking for R_ARM_JUMP24, R_ARM_THM_JUMP24, R_ARM_THM_JUMP19
and the deprecated R_ARM_PLT32 and R_ARM_PC24 instructions as these
cannot be written out as a BLX and need a state change thunk.
No range extension thunks. The R_ARM_JUMP24 and R_ARM_THM_CALL have a
range of 16Mb
No regression test for R_ARM_JUMP11, llvm-mc does not emit a relocated
B.N, however gnu-as does and there is at least one instance in the
arm-linux-gnueabihf libraries so it may be present in input objects.
Change-Id: I67a24f374c161f5e6018cd9951fbccb73ae82399
Diffstat (limited to 'test/ELF/Inputs/arm-thumb-narrow-branch.o')
-rw-r--r-- | test/ELF/Inputs/arm-thumb-narrow-branch.o | bin | 0 -> 868 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/test/ELF/Inputs/arm-thumb-narrow-branch.o b/test/ELF/Inputs/arm-thumb-narrow-branch.o Binary files differnew file mode 100644 index 000000000..9816ec703 --- /dev/null +++ b/test/ELF/Inputs/arm-thumb-narrow-branch.o |