mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
elf: correctly set symtab's sh_info to first global index
This commit is contained in:
parent
9bd60bef2a
commit
cfc0429bc9
@ -3109,6 +3109,7 @@ fn writeSymbols(self: *Elf) !void {
|
||||
.p32 => @alignOf(elf.Elf32_Sym),
|
||||
.p64 => @alignOf(elf.Elf64_Sym),
|
||||
};
|
||||
shdr.sh_info = @intCast(self.local_symbols.items.len);
|
||||
const nsyms = self.local_symbols.items.len + self.global_symbols.items.len;
|
||||
const needed_size = nsyms * sym_size;
|
||||
try self.growNonAllocSection(self.symtab_section_index.?, needed_size, sym_align, true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user