| author | |
| committer | |
| log | b058545970efb6f533f9930d23af2a6d0c6ce9c3 |
| tree | 08de418fbe5fc6ea8bfb86e6d03da17576606b17 |
| parent | 90c4037819b44f285e78dafac5a0196abb36b86a |
3 files changed, 0 insertions(+), 32 deletions(-)
src/link/Elf/Object.zig-8| ... | ... | @@ -630,12 +630,6 @@ pub fn claimUnresolvedObject(self: *Object, elf_file: *Elf) void { |
| 630 | 630 | if (esym.st_shndx != elf.SHN_UNDEF) continue; |
| 631 | 631 | if (elf_file.symbol(self.resolveSymbol(esym_index, elf_file)) != null) continue; |
| 632 | 632 | |
| 633 | // TODO: audit this | |
| 634 | // const global = elf_file.symbol(index); | |
| 635 | // if (global.file(elf_file)) |file| { | |
| 636 | // if (global.elfSym(elf_file).st_shndx != elf.SHN_UNDEF or file.index() <= self.index) continue; | |
| 637 | // } | |
| 638 | ||
| 639 | 633 | sym.value = 0; |
| 640 | 634 | sym.ref = .{ .index = 0, .file = 0 }; |
| 641 | 635 | sym.esym_index = esym_index; |
| ... | ... | @@ -849,8 +843,6 @@ pub fn resolveMergeSubsections(self: *Object, elf_file: *Elf) !void { |
| 849 | 843 | |
| 850 | 844 | for (self.symtab.items, 0..) |*esym, idx| { |
| 851 | 845 | const sym = &self.symbols.items[idx]; |
| 852 | // TODO: do we need ref here? | |
| 853 | ||
| 854 | 846 | if (esym.st_shndx == elf.SHN_COMMON or esym.st_shndx == elf.SHN_UNDEF or esym.st_shndx == elf.SHN_ABS) continue; |
| 855 | 847 | |
| 856 | 848 | const imsec_index = self.input_merge_sections_indexes.items[esym.st_shndx]; |
src/link/Elf/ZigObject.zig-12| ... | ... | @@ -410,12 +410,6 @@ pub fn claimUnresolvedObject(self: ZigObject, elf_file: *Elf) void { |
| 410 | 410 | if (esym.st_shndx != elf.SHN_UNDEF) continue; |
| 411 | 411 | if (elf_file.symbol(self.resolveSymbol(@intCast(i | global_symbol_bit), elf_file)) != null) continue; |
| 412 | 412 | |
| 413 | // TODO: audit this | |
| 414 | // const global = elf_file.symbol(index); | |
| 415 | // if (global.file(elf_file)) |file| { | |
| 416 | // if (global.elfSym(elf_file).st_shndx != elf.SHN_UNDEF or file.index() <= self.index) continue; | |
| 417 | // } | |
| 418 | ||
| 419 | 413 | global.value = 0; |
| 420 | 414 | global.ref = .{ .index = 0, .file = 0 }; |
| 421 | 415 | global.esym_index = @intCast(index); |
| ... | ... | @@ -1512,12 +1506,6 @@ pub fn deleteExport( |
| 1512 | 1506 | log.debug("deleting export '{s}'", .{exp_name}); |
| 1513 | 1507 | const esym = &self.symtab.items(.elf_sym)[esym_index.*]; |
| 1514 | 1508 | _ = self.globals_lookup.remove(esym.st_name); |
| 1515 | // const sym_index = elf_file.resolver.get(esym.st_name).?; | |
| 1516 | // const sym = elf_file.symbol(sym_index); | |
| 1517 | // if (sym.file_index == self.index) { | |
| 1518 | // _ = elf_file.resolver.swapRemove(esym.st_name); | |
| 1519 | // sym.* = .{}; | |
| 1520 | // } | |
| 1521 | 1509 | esym.* = Elf.null_sym; |
| 1522 | 1510 | self.symtab.items(.shndx)[esym_index.*] = elf.SHN_UNDEF; |
| 1523 | 1511 | } |
src/link/Elf/file.zig-12| ... | ... | @@ -67,18 +67,6 @@ pub const File = union(enum) { |
| 67 | 67 | }; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | pub fn resetGlobals(file: File, elf_file: *Elf) void { | |
| 71 | for (file.globals()) |global_index| { | |
| 72 | const global = elf_file.symbol(global_index); | |
| 73 | const name_offset = global.name_offset; | |
| 74 | const extra_index = global.extra_index; | |
| 75 | global.* = .{}; | |
| 76 | global.name_offset = name_offset; | |
| 77 | global.flags.global = true; | |
| 78 | global.extra_index = extra_index; | |
| 79 | } | |
| 80 | } | |
| 81 | ||
| 82 | 70 | pub fn setAlive(file: File) void { |
| 83 | 71 | switch (file) { |
| 84 | 72 | .zig_object, .linker_defined => {}, |