Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/link_elf.c
Show First 20 Lines • Show All 1,919 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
ef->address = 0; | ef->address = 0; | ||||
#endif | #endif | ||||
parse_dynamic(ef); | parse_dynamic(ef); | ||||
link_elf_preload_parse_symbols(ef); | link_elf_preload_parse_symbols(ef); | ||||
relocate_file1(ef, elf_lookup_ifunc, elf_reloc, true); | relocate_file1(ef, elf_lookup_ifunc, elf_reloc, true); | ||||
} | } | ||||
#if defined(__aarch64__) | |||||
kib: This should be not arm64 specific, rather it should depend on RELA vs REL. | |||||
andrewAuthorUnsubmitted Done Inline ActionsIt needs an implementation of elf_reloc_late in the per-arch code. I've only implemented it on arm64 as I'm unsure what other architectures use RELA relocations. andrew: It needs an implementation of `elf_reloc_late` in the per-arch code. I've only implemented it… | |||||
kibUnsubmitted Not Done Inline ActionsI think for now it is enough to have aarch64 and amd64. kib: I think for now it is enough to have aarch64 and amd64. | |||||
void | |||||
link_elf_late_ireloc(void) | |||||
{ | |||||
elf_file_t ef; | |||||
KASSERT(linker_kernel_file != NULL, | |||||
("link_elf_late_ireloc: No kernel linker file found")); | |||||
ef = (elf_file_t)linker_kernel_file; | |||||
relocate_file1(ef, elf_lookup_ifunc, elf_reloc_late, true); | |||||
} | |||||
#endif | |||||
#endif | #endif |
This should be not arm64 specific, rather it should depend on RELA vs REL.