[boot] Go back to loading symbol table in boot

The symbol table needs to be passed to the panic handler very early in
the kernel, loading it in init is far less useful. Return it to the boot
directory and remove it from the initrd.
This commit is contained in:
Justin C. Miller
2023-02-04 00:00:59 -08:00
parent 86d458fc6c
commit aba45b9b67
11 changed files with 50 additions and 79 deletions

View File

@@ -72,7 +72,7 @@ load_program(
util::const_buffer data = load_file(disk, desc.path);
elf::file program(data.pointer, data.count);
elf::file program {data};
if (!program.valid()) {
auto *header = program.header();
console::print(L" progam size: %d\r\n", data.count);
@@ -91,7 +91,7 @@ load_program(
verify_kernel_header(program, data);
size_t num_sections = 0;
for (auto &seg : program.programs()) {
for (auto &seg : program.segments()) {
if (seg.type == elf::segment_type::load)
++num_sections;
}
@@ -99,7 +99,7 @@ load_program(
bootproto::program_section *sections = new bootproto::program_section [num_sections];
size_t next_section = 0;
for (auto &seg : program.programs()) {
for (auto &seg : program.segments()) {
if (seg.type != elf::segment_type::load)
continue;