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

Insufficient R_MORELLO_JUMP_SLOT documentation #69

Open
jrtc27 opened this issue Feb 19, 2021 · 2 comments
Open

Insufficient R_MORELLO_JUMP_SLOT documentation #69

jrtc27 opened this issue Feb 19, 2021 · 2 comments

Comments

@jrtc27
Copy link

jrtc27 commented Feb 19, 2021

R_MORELLO_JUMP_SLOT is under-documented; in reality it is the same as R_AARCH64_JUMP_SLOT, with the linker initially filling in the 64-bit VA in the first half of the slot (pointing at the PLT header) just like with R_AARCH64_JUMP_SLOT (though this is awkward for the run-time linker, and would be better if it had the same in-memory format as R_MORELLO_RELATIVE so bounds can be provided by the static linker; this aligns with R_AARCH64_JUMP_SLOT, which for lazy binding is initially resolved identically to R_AARCH64_RELATIVE).

@sbaranga-arm
Copy link
Contributor

R_MORELLO_JUMP_SLOT being under-document - fair point.

Changing the fragment encoding also makes sense to me (although I wonder if we could also change the R_MORELLO_RELATIVE fragment encoding to make use of a build instruction).

@jrtc27
Copy link
Author

jrtc27 commented Feb 22, 2021

You could but it makes adding a non-zero relocbase awkward since there isn't a single instruction in Morello to increment the base without altering the length. You might be able to abuse the fact that Morello tag clears on invalid SCBNDS though to fake it; I think "get offset, add (relocbase - offset), set bounds to current length, add original base, build" works (but for us would trap horribly with "what on earth are you doing, no"), and is no less efficient than the current fragment processing.

amilendra added a commit to amilendra/abi-aa that referenced this issue Mar 7, 2024


Fix the specification for R_MORELLO_JUMP_SLOT to use the same format
as R_MORELLO_RELATIVE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants