Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aaelf32] Note that R_ARM_PREL31 can create veneers #246

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aaelf32/aaelf32.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2231,8 +2231,8 @@ to effect the transition to Thumb state. Conditional function call instructions

A linker may use a veneer (a sequence of instructions) to implement the
relocated branch if the relocation is one of R_ARM_PC24, R_ARM_CALL,
R_ARM_JUMP24, (or, in Thumb state, R_ARM_THM_CALL, R_ARM_THM_JUMP24, or
R_ARM_THM_JUMP19) and:
R_ARM_JUMP24, R_ARM_PREL31, (or, in Thumb state, R_ARM_THM_CALL,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the right place as R_ARM_PREL31 is not a call or jump relocation (https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst#L2037)

There is a section in the ehabi32 which states that most uses of R_ARM_PREL31 must be via the section symbol + addend to avoid the symbol getting indirected via the PLT or a Thunk so the only cases where there is R_ARM_PREL31 is the address of the personality routine.

I think if we were going to put this anywhere then something near:
https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst#L2557 might work

In addition to the data generating relocations listed above the call and branch
relocations (R_ARM_CALL, R_ARM_THM_CALL, R_ARM_JUMP24, R_ARM_THM_JUMP24, R_ARM_THM_JUMP19), and the data relocation R_ARM_PREL31, may also require a proxy to be generated if the symbol will
be defined in an external executable or may be pre-empted at execution time.

R_ARM_THM_JUMP24, or R_ARM_THM_JUMP19) and:

* The target symbol has type STT_FUNC

Expand Down
Loading