mirror of
https://github.com/ziglang/zig.git
synced 2026-01-10 01:15:14 +00:00
elf: update osec index for section chunks in objects
This commit is contained in:
parent
f87a7251a3
commit
6a50a0f0ed
@ -3411,6 +3411,7 @@ fn shdrRank(self: *Elf, shndx: u32) u8 {
|
||||
return 0xf9;
|
||||
}
|
||||
},
|
||||
elf.SHT_X86_64_UNWIND => return 0xf0,
|
||||
|
||||
elf.SHT_NOBITS => return if (flags & elf.SHF_TLS != 0) 0xf5 else 0xf7,
|
||||
elf.SHT_SYMTAB => return 0xfa,
|
||||
@ -3503,6 +3504,12 @@ fn resetShdrIndexes(self: *Elf, backlinks: []const u32) void {
|
||||
}
|
||||
}
|
||||
|
||||
for (self.objects.items) |index| {
|
||||
for (self.file(index).?.object.section_chunks.items) |*chunk| {
|
||||
chunk.output_section_index = backlinks[chunk.output_section_index];
|
||||
}
|
||||
}
|
||||
|
||||
for (self.comdat_group_sections.items) |*cg| {
|
||||
cg.shndx = backlinks[cg.shndx];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user