macho: fix incorrect lookup of symbols when calculating subtractors

This commit is contained in:
Jakub Konka 2022-10-20 20:57:56 +02:00
parent 93cc5496e1
commit f8cbe29a17

View File

@ -498,8 +498,9 @@ fn resolveRelocsArm64(
atom.file,
});
const sym_index = reverse_lookup[rel.r_symbolnum];
const sym_loc = SymbolWithLoc{
.sym_index = rel.r_symbolnum,
.sym_index = sym_index,
.file = atom.file,
};
const sym = zld.getSymbol(sym_loc);
@ -783,8 +784,9 @@ fn resolveRelocsX86(
atom.file,
});
const sym_index = reverse_lookup[rel.r_symbolnum];
const sym_loc = SymbolWithLoc{
.sym_index = rel.r_symbolnum,
.sym_index = sym_index,
.file = atom.file,
};
const sym = zld.getSymbol(sym_loc);