summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorChang S. Bae <changseok.bae@gmail.com>2018-10-08 18:49:56 -0700
committerCyrill Gorcunov <gorcunov@gmail.com>2018-10-09 10:23:10 +0300
commit7fcf32ba3105f4eee9ac08ac21e5116835639fc2 (patch)
tree38df8200bcd48edb5a0be104dd24a2d82fa1de35 /output
parent195e735a81d6b07e62d606558fb3a5cb8f0f2d4a (diff)
downloadnasm-7fcf32ba3105f4eee9ac08ac21e5116835639fc2.tar.gz
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>
Diffstat (limited to 'output')
-rw-r--r--output/outmacho.c2
1 files changed, 1 insertions, 1 deletions
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"