summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2016-06-14 18:01:21 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2016-06-14 18:04:46 -0700
commitb41952986b3cd7558cb128790bb94e1f60fd088a (patch)
tree8eae691ccb0c57e5f7f68d62e4d47f065ea3df86
parent5e0eb0c08b1d014e9584ebea430f746f706b5d67 (diff)
downloadnasm-b41952986b3cd7558cb128790bb94e1f60fd088a.tar.gz
outmacho: Fix relative relocations for 32-bit Mach-O (fix typo)
This unbreaks checkin 84f6860ed53492976c9d79e9a8a0bdc60da78bc6, which was broken due to a transcription error of mine. Zenith432 was faultless in this case. This fixes bug report 3392355. Reported-by: Zenith432 <zenith432@users.sourceforge.net> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--output/outmacho.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/output/outmacho.c b/output/outmacho.c
index 6887d8f5..40df300e 100644
--- a/output/outmacho.c
+++ b/output/outmacho.c
@@ -465,7 +465,7 @@ static int64_t add_reloc(struct section *sect, int32_t section,
r->snum = raa_read(extsyms, section);
if (reltype == RL_BRANCH)
r->type = X86_64_RELOC_BRANCH;
- else if (reltype == GENERIC_RELOC_VANILLA)
+ else if (r->type == GENERIC_RELOC_VANILLA)
adjust = -sect->size;
} else {
/* local */