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

enhance dynamic linker to handle DT_RELR relocations #1345

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wkozaczuk
Copy link
Collaborator

As this article
https://maskray.me/blog/2021-10-31-relative-relocations-and-relr explains, the relocations of new type RELR help significantly compress the traditional RELA ones.

More specifically, the new RELR section encodes information about relocations that merely need adding the base of the ELF object to a relative offset. The even entry encodes the location of the 1st symbol to be relocated. And the odd one encodes information about the subsequent symbols using a bitmap. For details look at the comments in the code.

The implementation is loosely based on the Musl one - https://git.musl-libc.org/cgit/musl/commit/?id=d32dadd60efb9d3b255351a3b532f8e4c3dd0db1

Fixes #1323

As this article
https://maskray.me/blog/2021-10-31-relative-relocations-and-relr
explains, the relocations of new type RELR help significantly compress
the traditional RELA ones.

More specifically, the new RELR section encodes information about
relocations that merely need adding the base of the ELF object
to a relative offset. The even entry encodes the location of the
1st symbol to be relocated. And the odd one encodes information
about the subsequent symbols using a bitmap. For details look
at the comments in the code.

The implementation is loosely based on the Musl one - https://git.musl-libc.org/cgit/musl/commit/?id=d32dadd60efb9d3b255351a3b532f8e4c3dd0db1

Fixes cloudius-systems#1323

Signed-off-by: Waldemar Kozaczuk <[email protected]>
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

Successfully merging this pull request may close these issues.

Lua shell doesn't run on Fedora 40
2 participants