diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2023-09-13 19:05:22 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2023-09-13 21:51:43 +0200 |
| commit | dbde746f9d95f2dbc8872e2d6283c2db64ac7519 (patch) | |
| tree | 6c22465f27b7b22c2b3447e668603e1d95aae126 /src/link/Elf/Object.zig | |
| parent | 5eef7577d1a49006d69d5067af0dd87be272db52 (diff) | |
| download | zig-dbde746f9d95f2dbc8872e2d6283c2db64ac7519.tar.gz zig-dbde746f9d95f2dbc8872e2d6283c2db64ac7519.zip | |
elf: parse archives
Diffstat (limited to 'src/link/Elf/Object.zig')
| -rw-r--r-- | src/link/Elf/Object.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/link/Elf/Object.zig b/src/link/Elf/Object.zig index b0a6ef2a1c..32c96b8d95 100644 --- a/src/link/Elf/Object.zig +++ b/src/link/Elf/Object.zig @@ -485,9 +485,9 @@ pub fn claimUnresolved(self: *Object, elf_file: *Elf) void { pub fn resetGlobals(self: *Object, elf_file: *Elf) void { for (self.globals()) |index| { const global = elf_file.symbol(index); - const name = global.name; + const off = global.name_offset; global.* = .{}; - global.name = name; + global.name_offset = off; } } @@ -499,7 +499,7 @@ pub fn markLive(self: *Object, elf_file: *Elf) void { if (sym.st_bind() == elf.STB_WEAK) continue; const global = elf_file.symbol(index); - const file = global.getFile(elf_file) orelse continue; + const file = global.file(elf_file) orelse continue; const should_keep = sym.st_shndx == elf.SHN_UNDEF or (sym.st_shndx == elf.SHN_COMMON and global.elfSym(elf_file).st_shndx != elf.SHN_COMMON); if (should_keep and !file.isAlive()) { |
