Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/link_elf_obj.c
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | #else | ||||
"elf64_obj", | "elf64_obj", | ||||
#endif | #endif | ||||
link_elf_methods, sizeof(struct elf_file) | link_elf_methods, sizeof(struct elf_file) | ||||
}; | }; | ||||
static int relocate_file(elf_file_t ef); | static int relocate_file(elf_file_t ef); | ||||
static void elf_obj_cleanup_globals_cache(elf_file_t); | static void elf_obj_cleanup_globals_cache(elf_file_t); | ||||
static void | static void | ||||
emaste: //Allow local symbols to participate in kernel module symbol resolution// or something like… | |||||
Done Inline ActionsAllow local symbols to participate in global module symbol resolution kib: Allow local symbols to participate in global module symbol resolution | |||||
link_elf_error(const char *filename, const char *s) | link_elf_error(const char *filename, const char *s) | ||||
{ | { | ||||
if (filename == NULL) | if (filename == NULL) | ||||
printf("kldload: %s\n", s); | printf("kldload: %s\n", s); | ||||
else | else | ||||
printf("kldload: %s: %s\n", filename, s); | printf("kldload: %s: %s\n", filename, s); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,361 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static int | static int | ||||
link_elf_each_function_nameval(linker_file_t file, | link_elf_each_function_nameval(linker_file_t file, | ||||
linker_function_nameval_callback_t callback, void *opaque) | linker_function_nameval_callback_t callback, void *opaque) | ||||
{ | { | ||||
linker_symval_t symval; | linker_symval_t symval; | ||||
elf_file_t ef = (elf_file_t)file; | elf_file_t ef = (elf_file_t)file; | ||||
const Elf_Sym* symp; | const Elf_Sym *symp; | ||||
int i, error; | int i, error; | ||||
/* Exhaustive search */ | /* Exhaustive search */ | ||||
for (i = 0, symp = ef->ddbsymtab; i < ef->ddbsymcnt; i++, symp++) { | for (i = 0, symp = ef->ddbsymtab; i < ef->ddbsymcnt; i++, symp++) { | ||||
if (symp->st_value != 0 && | if (symp->st_value != 0 && | ||||
(ELF_ST_TYPE(symp->st_info) == STT_FUNC || | (ELF_ST_TYPE(symp->st_info) == STT_FUNC || | ||||
ELF_ST_TYPE(symp->st_info) == STT_GNU_IFUNC)) { | ELF_ST_TYPE(symp->st_info) == STT_GNU_IFUNC)) { | ||||
error = link_elf_symbol_values(file, | error = link_elf_symbol_values(file, | ||||
▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines |
Allow local symbols to participate in kernel module symbol resolution or something like that?
Maybe even add (temporary) in the description if our intent is to remove this soon? Although it might not be apparent that the existence of the sysctl itself is what's temporary, not some aspect of symbol resolution.