summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldso/ldso/x86_64/dl-sysdep.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ldso/ldso/x86_64/dl-sysdep.h b/ldso/ldso/x86_64/dl-sysdep.h
index e8346452c..a156e7be3 100644
--- a/ldso/ldso/x86_64/dl-sysdep.h
+++ b/ldso/ldso/x86_64/dl-sysdep.h
@@ -102,14 +102,14 @@ elf_machine_load_address (void)
}
static __always_inline void
-elf_machine_relative (Elf64_Addr load_off, const Elf64_Addr rel_addr,
- Elf64_Word relative_count)
+elf_machine_relative(Elf64_Addr load_off, const Elf64_Addr rel_addr,
+ Elf64_Word relative_count)
{
- Elf64_Rel * rpnt = (void *) rel_addr;
+ Elf64_Rela *rpnt = (void *)rel_addr;
--rpnt;
do {
Elf64_Addr *const reloc_addr = (void *) (load_off + (++rpnt)->r_offset);
- *reloc_addr += load_off;
+ *reloc_addr = load_off + rpnt->r_addend;
} while (--relative_count);
}