summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-17 22:22:17 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-17 22:22:17 -0700
commit8218572d5ed33d4d581133fbf34fc6249ca29ba9 (patch)
tree00b8345c5c363208dc0ec299279e06d9d58cf0d4 /output
parentbdfd3b3b87b6f9e912724bff1cf3f6aa34cc9efe (diff)
downloadnasm-8218572d5ed33d4d581133fbf34fc6249ca29ba9.tar.gz
nasm-8218572d5ed33d4d581133fbf34fc6249ca29ba9.tar.bz2
nasm-8218572d5ed33d4d581133fbf34fc6249ca29ba9.zip
ELF64: GOTOFF64 doesn't need a gsym at all
GOTOFF64 is used for local variables (as a 64-bit offset from the GOT; only needed in the Medium PIC or Large PIC models.) It therefore should *not* be a elf_add_gsym_reloc() invocation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'output')
-rw-r--r--output/outelf64.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/output/outelf64.c b/output/outelf64.c
index 1405d2f..fa4a631 100644
--- a/output/outelf64.c
+++ b/output/outelf64.c
@@ -1012,8 +1012,7 @@ static void elf_out(int32_t segto, const void *data,
error(ERR_NONFATAL, "ELF64 requires ..gotoff "
"references to be qword absolute");
} else {
- elf_add_gsym_reloc(s, segment, addr, 0,
- R_X86_64_GOTOFF64, false);
+ elf_add_reloc(s, segment, addr, R_X86_64_GOTOFF64);
addr = 0;
}
} else if (wrt == elf_got_sect + 1) {