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

Musl loader updates: relr support and relocation of init_array entries #1473

Merged
merged 4 commits into from
Jun 27, 2023

Conversation

vtikoo
Copy link
Collaborator

@vtikoo vtikoo commented Jun 20, 2023

Summary

libcrypto from openssl 3 has relr relocations which are not supported by musl loader. It also has init_array entries which are not relocated by the loader.

@vtikoo
Copy link
Collaborator Author

vtikoo commented Jun 20, 2023

Myst gdb extension is also having trouble handling files with relr entries.

libcrypto from openssl 3 has relr relocations which are not supported by musl loader. It also has init_array entries which are not relocated by the loader.

- PR adds support for relocating init_array entries.

- relr relocations are already supported by  musl 1.2.24, I have ported just those changes in this PR.
Upstream musl commits related to RELR relocations:
bminor/musl@d32dadd
bminor/musl@bf99258

Signed-off-by: Vikas Tikoo <[email protected]>
@vtikoo vtikoo force-pushed the relr-support-musl branch from d5386c6 to 9d53f1c Compare June 22, 2023 21:10
@vtikoo vtikoo force-pushed the relr-support-musl branch from 9d53f1c to 76aaa8a Compare June 22, 2023 21:16
@mikbras
Copy link
Contributor

mikbras commented Jun 27, 2023

Hi Vikas. Looks good to me but wondering whether upgrading to the latest musl libc would be much harder.

Please merge when you are ready. We can revisit idea of upgrading to latest musl later.

Copy link
Contributor

@mikbras mikbras left a comment

Choose a reason for hiding this comment

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

Looks good to me. Consider upgrading latest musl libc?

@vtikoo vtikoo merged commit 555e5cf into deislabs:main Jun 27, 2023
@vtikoo vtikoo deleted the relr-support-musl branch June 27, 2023 18:52
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.

3 participants