mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
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>
This commit is contained in:
parent
bdfd3b3b87
commit
8218572d5e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user