diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-10-17 23:32:40 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-10-17 23:32:40 -0700 |
commit | 2a282275fec471daf93426f5fc2c4c92ba3197e4 (patch) | |
tree | 5799ad5ba1b5d8b4511678746266a06c996f2e49 /output | |
parent | 7f1315070e6ac38d4194cc333b391dcecf6f0053 (diff) | |
download | nasm-2a282275fec471daf93426f5fc2c4c92ba3197e4.tar.gz nasm-2a282275fec471daf93426f5fc2c4c92ba3197e4.tar.bz2 nasm-2a282275fec471daf93426f5fc2c4c92ba3197e4.zip |
ELF64: PLT32, GOTPCREL, and GOTPCREL64 really need exactitude
Now when the assembler is properly generating the address that we push
down to the backend, enable requesting an exact value for these
relocations (these are pointing to a specific GOT or PLT slot; the
addend is used to adjust the computed value in the instruction, not
for offset for the symbol.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'output')
-rw-r--r-- | output/outelf64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/output/outelf64.c b/output/outelf64.c index 3dfa8ba..dcb1675 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -1100,13 +1100,13 @@ static void elf_out(int32_t segto, const void *data, addr = 0; } else if (wrt == elf_plt_sect + 1) { elf_add_gsym_reloc(s, segment, addr, size, - R_X86_64_PLT32, false); + R_X86_64_PLT32, true); addr = 0; } else if (wrt == elf_gotpc_sect + 1 || wrt == elf_got_sect + 1) { printf("addr = %ld, pcrel = %ld\n", addr, size); elf_add_gsym_reloc(s, segment, addr, size, - R_X86_64_GOTPCREL, false); + R_X86_64_GOTPCREL, true); addr = 0; } else if (wrt == elf_gotoff_sect + 1 || wrt == elf_got_sect + 1) { @@ -1134,7 +1134,7 @@ static void elf_out(int32_t segto, const void *data, } else if (wrt == elf_gotpc_sect + 1 || wrt == elf_got_sect + 1) { elf_add_gsym_reloc(s, segment, addr, size, - R_X86_64_GOTPCREL64, false); + R_X86_64_GOTPCREL64, true); addr = 0; } else if (wrt == elf_gotoff_sect + 1 || wrt == elf_got_sect + 1) { |