Tested with ifunc resolvers in the kernel and module with calls from
kernel to kernel, module to kernel, and module to module.
Details
- Reviewers
kib manu - Group Reviewers
arm64 - Commits
- rS339074: Add kernel ifunc support on arm64.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/arm64/arm64/machdep.c | ||
---|---|---|
1077 ↗ | (On Diff #48609) | I expect to move link_elf_ireloc earlier into the boot, however I also expect we will need to rerun the resolver functions after secondary CPUs have been started. They may have different ID registers that affect which implementation they select. |
sys/arm64/arm64/machdep.c | ||
---|---|---|
1077 ↗ | (On Diff #48609) | For RELA relocations this should work, but not for REL. Also, you need to ensure that APs do not execute relocated code until fixed. |
sys/arm64/arm64/machdep.c | ||
---|---|---|
1077 ↗ | (On Diff #48609) | I would expect we need to transform REL to RELA before the first relocation pass. The resolvers in the early pass would need to understand they need to return safe values, however I expect any function that runs on the boot CPU will also run on the non-boot CPU, however it may be suboptimal. |
sys/arm64/arm64/machdep.c | ||
---|---|---|
1077 ↗ | (On Diff #48609) | I am not sure I see how the REL->RELA translation can be done, there is no space in Elf_Rel to save the addend, it is taken from the patched place and is overwritten by the act of relocation. OTOH, I expect that arm64 uses RELA, same as amd64. |