| ... | @@ -912,12 +912,13 @@ fn updateDeclCode( | ... | @@ -912,12 +912,13 @@ fn updateDeclCode( |
| 912 | const sym = elf_file.symbol(sym_index); | 912 | const sym = elf_file.symbol(sym_index); |
| 913 | const esym = &self.local_esyms.items(.elf_sym)[sym.esym_index]; | 913 | const esym = &self.local_esyms.items(.elf_sym)[sym.esym_index]; |
| 914 | const atom_ptr = sym.atom(elf_file).?; | 914 | const atom_ptr = sym.atom(elf_file).?; |
| | 915 | const name_offset = try self.strtab.insert(gpa, decl.fqn.toSlice(ip)); |
| 915 | | 916 | |
| 916 | atom_ptr.alive = true; | 917 | atom_ptr.alive = true; |
| 917 | atom_ptr.name_offset = sym.name_offset; | 918 | atom_ptr.name_offset = name_offset; |
| 918 | atom_ptr.output_section_index = shdr_index; | 919 | atom_ptr.output_section_index = shdr_index; |
| 919 | sym.name_offset = try self.strtab.insert(gpa, decl.fqn.toSlice(ip)); | 920 | sym.name_offset = name_offset; |
| 920 | esym.st_name = sym.name_offset; | 921 | esym.st_name = name_offset; |
| 921 | esym.st_info |= stt_bits; | 922 | esym.st_info |= stt_bits; |
| 922 | esym.st_size = code.len; | 923 | esym.st_size = code.len; |
| 923 | | 924 | |
| ... | @@ -1009,15 +1010,17 @@ fn updateTlv( | ... | @@ -1009,15 +1010,17 @@ fn updateTlv( |
| 1009 | const sym = elf_file.symbol(sym_index); | 1010 | const sym = elf_file.symbol(sym_index); |
| 1010 | const esym = &self.local_esyms.items(.elf_sym)[sym.esym_index]; | 1011 | const esym = &self.local_esyms.items(.elf_sym)[sym.esym_index]; |
| 1011 | const atom_ptr = sym.atom(elf_file).?; | 1012 | const atom_ptr = sym.atom(elf_file).?; |
| | 1013 | const name_offset = try self.strtab.insert(gpa, decl.fqn.toSlice(ip)); |
| 1012 | | 1014 | |
| 1013 | sym.value = 0; | 1015 | sym.value = 0; |
| 1014 | atom_ptr.output_section_index = shndx; | 1016 | sym.name_offset = name_offset; |
| 1015 | | 1017 | |
| 1016 | sym.name_offset = try self.strtab.insert(gpa, decl.fqn.toSlice(ip)); | 1018 | atom_ptr.output_section_index = shndx; |
| 1017 | atom_ptr.alive = true; | 1019 | atom_ptr.alive = true; |
| 1018 | atom_ptr.name_offset = sym.name_offset; | 1020 | atom_ptr.name_offset = name_offset; |
| | 1021 | |
| 1019 | esym.st_value = 0; | 1022 | esym.st_value = 0; |
| 1020 | esym.st_name = sym.name_offset; | 1023 | esym.st_name = name_offset; |
| 1021 | esym.st_info = elf.STT_TLS; | 1024 | esym.st_info = elf.STT_TLS; |
| 1022 | esym.st_size = code.len; | 1025 | esym.st_size = code.len; |
| 1023 | | 1026 | |