DynamicLoader: Don't truncate dynamic section address on x86_64

This commit is contained in:
Andreas Kling 2021-07-22 22:40:33 +02:00
parent e44a41d0bf
commit cdae397e6a
Notes: sideshowbarker 2024-07-18 08:30:22 +09:00

View file

@ -37,7 +37,7 @@ static void perform_self_relocations(auxv_t* auxvp)
VERIFY(found_base_address);
ElfW(Ehdr)* header = (ElfW(Ehdr)*)(base_address);
ElfW(Phdr)* pheader = (ElfW(Phdr)*)(base_address + header->e_phoff);
u32 dynamic_section_addr = 0;
FlatPtr dynamic_section_addr = 0;
for (size_t i = 0; i < (size_t)header->e_phnum; ++i, ++pheader) {
if (pheader->p_type != PT_DYNAMIC)
continue;