| ... | @@ -563,14 +563,14 @@ pub fn convertCommonSymbols(self: *Object, elf_file: *Elf) !void { | ... | @@ -563,14 +563,14 @@ pub fn convertCommonSymbols(self: *Object, elf_file: *Elf) !void { |
| 563 | if (this_sym.st_shndx != elf.SHN_COMMON) continue; | 563 | if (this_sym.st_shndx != elf.SHN_COMMON) continue; |
| 564 | | 564 | |
| 565 | const global = elf_file.symbol(index); | 565 | const global = elf_file.symbol(index); |
| 566 | const global_file = global.getFile(elf_file).?; | 566 | const global_file = global.file(elf_file).?; |
| 567 | if (global_file.getIndex() != self.index) { | 567 | if (global_file.index() != self.index) { |
| 568 | if (elf_file.options.warn_common) { | 568 | // if (elf_file.options.warn_common) { |
| 569 | elf_file.base.warn("{}: multiple common symbols: {s}", .{ | 569 | // elf_file.base.warn("{}: multiple common symbols: {s}", .{ |
| 570 | self.fmtPath(), | 570 | // self.fmtPath(), |
| 571 | global.getName(elf_file), | 571 | // global.getName(elf_file), |
| 572 | }); | 572 | // }); |
| 573 | } | 573 | // } |
| 574 | continue; | 574 | continue; |
| 575 | } | 575 | } |
| 576 | | 576 | |
| ... | @@ -579,13 +579,13 @@ pub fn convertCommonSymbols(self: *Object, elf_file: *Elf) !void { | ... | @@ -579,13 +579,13 @@ pub fn convertCommonSymbols(self: *Object, elf_file: *Elf) !void { |
| 579 | const atom_index = try elf_file.addAtom(); | 579 | const atom_index = try elf_file.addAtom(); |
| 580 | try self.atoms.append(gpa, atom_index); | 580 | try self.atoms.append(gpa, atom_index); |
| 581 | | 581 | |
| 582 | const is_tls = global.getType(elf_file) == elf.STT_TLS; | 582 | const is_tls = global.type(elf_file) == elf.STT_TLS; |
| 583 | const name = if (is_tls) ".tbss" else ".bss"; | 583 | const name = if (is_tls) ".tls_common" else ".common"; |
| 584 | | 584 | |
| 585 | const atom = elf_file.atom(atom_index).?; | 585 | const atom = elf_file.atom(atom_index).?; |
| 586 | atom.atom_index = atom_index; | 586 | atom.atom_index = atom_index; |
| 587 | atom.name = try elf_file.strtab.insert(gpa, name); | 587 | atom.name_offset = try elf_file.strtab.insert(gpa, name); |
| 588 | atom.file = self.index; | 588 | atom.file_index = self.index; |
| 589 | atom.size = this_sym.st_size; | 589 | atom.size = this_sym.st_size; |
| 590 | const alignment = this_sym.st_value; | 590 | const alignment = this_sym.st_value; |
| 591 | atom.alignment = Alignment.fromNonzeroByteUnits(alignment); | 591 | atom.alignment = Alignment.fromNonzeroByteUnits(alignment); |
| ... | @@ -606,10 +606,10 @@ pub fn convertCommonSymbols(self: *Object, elf_file: *Elf) !void { | ... | @@ -606,10 +606,10 @@ pub fn convertCommonSymbols(self: *Object, elf_file: *Elf) !void { |
| 606 | .sh_addralign = alignment, | 606 | .sh_addralign = alignment, |
| 607 | .sh_entsize = 0, | 607 | .sh_entsize = 0, |
| 608 | }; | 608 | }; |
| 609 | atom.shndx = shndx; | 609 | atom.input_section_index = shndx; |
| 610 | | 610 | |
| 611 | global.value = 0; | 611 | global.value = 0; |
| 612 | global.atom = atom_index; | 612 | global.atom_index = atom_index; |
| 613 | global.flags.weak = false; | 613 | global.flags.weak = false; |
| 614 | } | 614 | } |
| 615 | } | 615 | } |