This adds support for the following relocations:
- R_ARM_THM_ALU_ABS_G0_NC
- R_ARM_THM_ALU_ABS_G1_NC
- R_ARM_THM_ALU_ABS_G2_NC
- R_ARM_THM_ALU_ABS_G3
Paths
| Differential D153407
[lld][ARM] Add support for 16-bit thumb group relocations ClosedPublic Authored by john.brawn on Jun 21 2023, 2:56 AM.
Details Summary This adds support for the following relocations:
Diff Detail
Event Timelinejohn.brawn added a parent revision: D149443: [ARM] add Thumb-1 8-bit movs/adds relocations to LLVM.Jun 21 2023, 2:57 AM Comment Actions One tiny nit aside, looks good to me. Please leave some time for MaskRay to take a look. For reference: the R_ARM_THM_ALU_ABS_G* relocations are defined in the Static Thumb16 Relocations table https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst#5615static-thumb16-relocations .
This revision is now accepted and ready to land.Jun 21 2023, 6:57 AM Comment Actions
Thanks. Looks good to me as well. It would be good to place the link to the summary/commit message.
This revision was landed with ongoing or failed builds.Jun 23 2023, 5:43 AM Closed by commit rG5421ab462506: [lld][ARM] Add support for 16-bit thumb group relocations (authored by john.brawn). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 533934 lld/ELF/Arch/ARM.cpp
lld/test/ELF/arm-thumb-alu.s
|
This may be an instance that duplicating write16(loc, (read16(loc) &~ 0x00ff) | (val & 0xff)); is better than a chain of [[fallthrough]];...
If the case code is close enough, we should not worry much that we made a mistake in the formula.