aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 81ed866..47f1295 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -3156,7 +3156,6 @@ elf_x86_64_relocate_section (bfd *output_bfd,
{
Elf_Internal_Rela outrel;
asection *sreloc;
- bfd_boolean relocate;
/* Need a dynamic relocation to get the real function
address. */
@@ -3176,15 +3175,15 @@ elf_x86_64_relocate_section (bfd *output_bfd,
|| info->executable)
{
/* This symbol is resolved locally. */
- outrel.r_info = htab->r_info (0, R_X86_64_RELATIVE);
- outrel.r_addend = relocation;
- relocate = TRUE;
+ outrel.r_info = htab->r_info (0, R_X86_64_IRELATIVE);
+ outrel.r_addend = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
}
else
{
outrel.r_info = htab->r_info (h->dynindx, r_type);
outrel.r_addend = 0;
- relocate = FALSE;
}
sreloc = htab->elf.irelifunc;
@@ -3195,8 +3194,7 @@ elf_x86_64_relocate_section (bfd *output_bfd,
we need to include the symbol value so that it
becomes an addend for the dynamic reloc. For an
internal symbol, we have updated addend. */
- if (! relocate)
- continue;
+ continue;
}
/* FALLTHROUGH */
case R_X86_64_PC32: