summaryrefslogtreecommitdiff
path: root/libc/sysdeps/sparc/sparc64/dl-machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/sparc/sparc64/dl-machine.h')
-rw-r--r--libc/sysdeps/sparc/sparc64/dl-machine.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/libc/sysdeps/sparc/sparc64/dl-machine.h b/libc/sysdeps/sparc/sparc64/dl-machine.h
index 87655d28a..35c24d155 100644
--- a/libc/sysdeps/sparc/sparc64/dl-machine.h
+++ b/libc/sysdeps/sparc/sparc64/dl-machine.h
@@ -125,9 +125,6 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
/* The SPARC never uses Elf64_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
-/* The SPARC overlaps DT_RELA and DT_PLTREL. */
-#define ELF_MACHINE_PLTREL_OVERLAP 1
-
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
@@ -388,6 +385,12 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
if (__builtin_expect (r_type == R_SPARC_NONE, 0))
return;
+ if (__builtin_expect (r_type == R_SPARC_SIZE64, 0))
+ {
+ *reloc_addr = sym->st_size + reloc->r_addend;
+ return;
+ }
+
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
{
@@ -555,6 +558,12 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
(((value & 0x3ff) + ELF64_R_TYPE_DATA (reloc->r_info)) & 0x1fff));
break;
+ /* ABS34 code model reloc */
+ case R_SPARC_H34:
+ *(unsigned int *) reloc_addr =
+ ((*(unsigned int *)reloc_addr & 0xffc00000) |
+ ((value >> 12) & 0x3fffff));
+
/* MEDMID code model relocs */
case R_SPARC_H44:
*(unsigned int *) reloc_addr =