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:
H. Peter Anvin 2008-10-17 22:22:17 -07:00
parent bdfd3b3b87
commit 8218572d5e

View File

@ -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) {