macho: prep for lowering TLS variables

This commit is contained in:
Jakub Konka
2024-01-20 18:08:11 +01:00
parent 5c30c23fc4
commit 55f57ceb2e
2 changed files with 23 additions and 27 deletions

View File

@@ -996,10 +996,9 @@ fn genDeclRef(
}
const sym_index = try macho_file.getZigObject().?.getOrCreateMetadataForDecl(macho_file, decl_index);
const sym = macho_file.getSymbol(sym_index);
// TODO: tlv
// if (is_threadlocal) {
// return GenResult.mcv(.{ .load_tlv = sym.nlist_idx });
// }
if (is_threadlocal) {
return GenResult.mcv(.{ .load_tlv = sym.nlist_idx });
}
return GenResult.mcv(.{ .load_symbol = sym.nlist_idx });
} else if (lf.cast(link.File.Coff)) |coff_file| {
if (is_extern) {