macho/reloc: Fix addr size sensitive conditions

TLVP relocation helps GOT that is 64-bit only.

Based-on-code-from: zenith432 <zenith432@users.sourceforge.net>
Signed-off-by: Chang S. Bae <changseok.bae@gmail.com>
This commit is contained in:
Chang S. Bae 2018-10-08 18:49:56 -07:00 committed by Cyrill Gorcunov
parent 195e735a81
commit 7fcf32ba31

View File

@ -795,7 +795,7 @@ static void macho_output(int32_t secto, const void *data,
reltype = RL_GOTLOAD;
}
}
} else if (wrt == macho_tlvp_sect) {
} else if (wrt == macho_tlvp_sect && fmt.ptrsize == 8) {
reltype = RL_TLV;
} else {
nasm_error(ERR_NONFATAL, "Mach-O format does not support"