Skip to content

Commit 7cade87

Browse files
committed
test: modules test chainloads from loadable segment
1 parent dbde396 commit 7cade87

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/kernel/integration/modules/service.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ void Service::start(const std::string& args)
7070
MYINFO("Preparing for jump to %s. Multiboot magic: 0x%x, addr 0x%x",
7171
(char*)binary.cmdline, __multiboot_magic, __multiboot_addr);
7272

73-
char* base = (char*)binary.mod_start;
73+
auto load_offs = elf.program_headers()[0].p_offset;
74+
char* base = (char*)binary.mod_start + load_offs;
7475
int len = (int)(binary.mod_end - binary.mod_start);
7576
char* dest = (char*)0xA00000;
7677
void* start = (void*)elf.entry();

0 commit comments

Comments
 (0)