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

AArch64: implement IFUNC #331

Closed
marxin opened this issue Jan 25, 2025 · 0 comments · Fixed by #341
Closed

AArch64: implement IFUNC #331

marxin opened this issue Jan 25, 2025 · 0 comments · Fixed by #341
Assignees

Comments

@marxin
Copy link
Collaborator

marxin commented Jan 25, 2025

That's something that needs to emit a PLT GOT entry that is called:

wild/libwild/src/x86_64.rs

Lines 118 to 129 in 864c956

// IFuncs cannot be referenced directly. The always need to go via the GOT. So if we've got
// say a PLT32 relocation, we don't want to relax it even if we're in a static executable.
// Furthermore, if we encounter a relocation like PC32 to an ifunc, then we need to change
// it so that it goes via the GOT. This is kind of the opposite of relaxation.
if value_flags.contains(ValueFlags::IFUNC) {
return match relocation_kind {
object::elf::R_X86_64_PC32 => {
return create(RelaxationKind::NoOp, object::elf::R_X86_64_PLT32);
}
_ => None,
};
}

@marxin marxin self-assigned this Jan 25, 2025
marxin added a commit to marxin/wild that referenced this issue Jan 26, 2025
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 a pull request may close this issue.

1 participant