Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/link_elf.c
| Show First 20 Lines • Show All 2,035 Lines • ▼ Show 20 Lines | link_elf_propagate_vnets(linker_file_t lf) | ||||
| if (ef->vnet_base != 0) { | if (ef->vnet_base != 0) { | ||||
| size = (uintptr_t)ef->vnet_stop - (uintptr_t)ef->vnet_start; | size = (uintptr_t)ef->vnet_stop - (uintptr_t)ef->vnet_start; | ||||
| vnet_data_copy((void *)ef->vnet_base, size); | vnet_data_copy((void *)ef->vnet_base, size); | ||||
| } | } | ||||
| } | } | ||||
| #endif | #endif | ||||
| #if !defined(__riscv) | |||||
| /* | /* | ||||
| * Use this lookup routine when performing relocations early during boot. | * Use this lookup routine when performing relocations early during boot. | ||||
| * The generic lookup routine depends on kobj, which is not initialized | * The generic lookup routine depends on kobj, which is not initialized | ||||
| * at that point. | * at that point. | ||||
| */ | */ | ||||
| static int | static int | ||||
| elf_lookup_ifunc(linker_file_t lf, Elf_Size symidx, int deps __unused, | elf_lookup_ifunc(linker_file_t lf, Elf_Size symidx, int deps __unused, | ||||
| Elf_Addr *res) | Elf_Addr *res) | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | link_elf_late_ireloc(void) | ||||
| elf_file_t ef; | elf_file_t ef; | ||||
| KASSERT(linker_kernel_file != NULL, | KASSERT(linker_kernel_file != NULL, | ||||
| ("link_elf_late_ireloc: No kernel linker file found")); | ("link_elf_late_ireloc: No kernel linker file found")); | ||||
| ef = (elf_file_t)linker_kernel_file; | ef = (elf_file_t)linker_kernel_file; | ||||
| relocate_file1(ef, elf_lookup_ifunc, elf_reloc_late, true); | relocate_file1(ef, elf_lookup_ifunc, elf_reloc_late, true); | ||||
| } | } | ||||
| #endif | |||||
| #endif | #endif | ||||