-
Notifications
You must be signed in to change notification settings - Fork 212
Open
Description
ARM32 ELF psABI defines that the result mask for R_ARM_CALL and R_ARM_JUMP24 relocations is 0x03FFFFFE (search for 0x03FFFFFE in https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst). But isn't that a typo for 0x03FFFFFC?
R_ARM_CALL and R_ARM_JUMP24 are used for B, BL and BLX instructions whose immediate size is 24. You can see the instruction format at https://developer.arm.com/documentation/ddi0597/2024-12/A32-Instructions-by-Encoding/Branch--branch-with-link--and-block-data-transfer?lang=en.
0x03FFFFFE masks all but the middle 25 bits and yields a 2-byte aligned address. I may be missing something, but it looks like it's simply a typo for 0x03FFFFFC, which yields a 24 bit value with 4-byte alignment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels