| ... | ... | @@ -294,9 +294,11 @@ fn newLocalSymbol(self: *ZigObject, allocator: Allocator, name_off: u32) !Symbol |
| 294 | 294 | |
| 295 | 295 | fn newGlobalSymbol(self: *ZigObject, allocator: Allocator, name_off: u32) !Symbol.Index { |
| 296 | 296 | try self.global_symbols.ensureUnusedCapacity(allocator, 1); |
| 297 | try self.symbols_resolver.ensureUnusedCapacity(allocator, 1); |
| 297 | 298 | const fake_index: Symbol.Index = @intCast(self.global_symbols.items.len); |
| 298 | 299 | const index = try self.newSymbol(allocator, name_off, elf.STB_GLOBAL); |
| 299 | 300 | self.global_symbols.appendAssumeCapacity(index); |
| 301 | self.symbols_resolver.addOneAssumeCapacity().* = 0; |
| 300 | 302 | return fake_index | global_symbol_bit; |
| 301 | 303 | } |
| 302 | 304 | |