mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
elf: actually init symbol resolvers array in ZigObject
This commit is contained in:
parent
668fd7aca6
commit
128289fda1
@ -294,9 +294,11 @@ fn newLocalSymbol(self: *ZigObject, allocator: Allocator, name_off: u32) !Symbol
|
||||
|
||||
fn newGlobalSymbol(self: *ZigObject, allocator: Allocator, name_off: u32) !Symbol.Index {
|
||||
try self.global_symbols.ensureUnusedCapacity(allocator, 1);
|
||||
try self.symbols_resolver.ensureUnusedCapacity(allocator, 1);
|
||||
const fake_index: Symbol.Index = @intCast(self.global_symbols.items.len);
|
||||
const index = try self.newSymbol(allocator, name_off, elf.STB_GLOBAL);
|
||||
self.global_symbols.appendAssumeCapacity(index);
|
||||
self.symbols_resolver.addOneAssumeCapacity().* = 0;
|
||||
return fake_index | global_symbol_bit;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user