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

Add native support for writing ELF R_AARCH64_CALL26 relocations #322

Merged
merged 3 commits into from
Jun 11, 2021

Conversation

bjorn3
Copy link
Contributor

@bjorn3 bjorn3 commented Jun 10, 2021

Necessary for AArch64 support in cranelift-object.

@philipc
Copy link
Contributor

philipc commented Jun 10, 2021

For my understanding, can you elaborate on why this is required instead of RelocationKind::Elf?

Do you need R_AARCH64_JUMP26 as well?

@bjorn3
Copy link
Contributor Author

bjorn3 commented Jun 10, 2021

RelocationKind::Elf would require implementing this in cranelift-object for each object file format inidividually instead of once. Also there are already x86_64 specific encodings. R_AARCH64_JUMP26 is not used by Cranelift.

@philipc
Copy link
Contributor

philipc commented Jun 10, 2021

Ok. This will never be used for PIC relocations, correct?

@bjorn3
Copy link
Contributor Author

bjorn3 commented Jun 10, 2021

Cranelift currently doesn't support PIC on AArch64. I am not sure which relocation type is used for PLT calls on AArch64 normally.

src/read/elf/relocation.rs Show resolved Hide resolved
src/write/elf.rs Show resolved Hide resolved
Copy link
Contributor

@philipc philipc left a comment

Choose a reason for hiding this comment

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

Thanks! I assume this needs a release?

@philipc philipc merged commit d26bc89 into gimli-rs:master Jun 11, 2021
@bjorn3 bjorn3 deleted the aarch64_call26 branch June 11, 2021 10:30
@bjorn3
Copy link
Contributor Author

bjorn3 commented Jun 11, 2021

Yes please.

mcbegamerxx954 pushed a commit to mcbegamerxx954/object that referenced this pull request Jun 15, 2024
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.

2 participants