boot: use multiboot2 symbol table

This commit is contained in:
Mark
2020-09-20 13:49:18 +03:00
parent 1dea3c9e43
commit 02136a28b5
3 changed files with 29 additions and 11 deletions
+10 -2
View File
@@ -2,10 +2,18 @@
#include "sys/types.h"
#include "sys/elf.h"
struct multiboot_tag_elf_sections;
struct elf_sections {
enum {
KSYM_TABLE_NONE,
KSYM_TABLE_MULTIBOOT2,
} kind;
union {
struct multiboot_tag_elf_sections *multiboot2;
} tables;
};
void ksym_set_tables(uintptr_t symtab, uintptr_t strtab, size_t symtab_size, size_t strtab_size);
void ksym_set_multiboot2(struct multiboot_tag_elf_sections *tag);
void ksym_set(struct elf_sections *sections);
Elf64_Sym *ksym_lookup(const char *name);
int ksym_find_location(uintptr_t addr, const char **name, uintptr_t *base);