From 7fcf32ba3105f4eee9ac08ac21e5116835639fc2 Mon Sep 17 00:00:00 2001 From: "Chang S. Bae" Date: Mon, 8 Oct 2018 18:49:56 -0700 Subject: [PATCH] macho/reloc: Fix addr size sensitive conditions TLVP relocation helps GOT that is 64-bit only. Based-on-code-from: zenith432 Signed-off-by: Chang S. Bae --- output/outmacho.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/outmacho.c b/output/outmacho.c index 45f91b0d..4ec85690 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -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" -- 2.11.4.GIT