Commit 51efee2cb6

Jakub Konka <kubkon@jakubkonka.com>
2023-11-11 18:30:35
elf: fix allocating local TLS symbols
1 parent 1afc691
Changed files (1)
src
link
src/link/Elf/ZigObject.zig
@@ -402,7 +402,7 @@ pub fn allocateTlvAtoms(self: ZigObject, elf_file: *Elf) void {
         const local = elf_file.symbol(tlv.symbol_index);
         const shdr = elf_file.shdrs.items[atom.output_section_index];
         atom.value += shdr.sh_addr;
-        local.value += shdr.sh_addr;
+        local.value = atom.value;
 
         // TODO exported TLS vars
     }