elf: fix properly updating .got.zig section

This commit is contained in:
Jakub Konka 2023-11-01 23:42:01 +01:00
parent 5698be3ef0
commit e8f522122a

View File

@ -625,6 +625,11 @@ pub fn initMetadata(self: *Elf) !void {
shdr.sh_addr = phdr.p_vaddr;
shdr.sh_offset = phdr.p_offset;
shdr.sh_size = phdr.p_memsz;
try self.phdr_to_shdr_table.putNoClobber(
gpa,
self.zig_got_section_index.?,
self.phdr_zig_got_index.?,
);
}
if (self.zig_data_rel_ro_section_index == null) {