aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sh')
-rw-r--r--sysdeps/sh/dl-machine.h7
-rw-r--r--sysdeps/sh/elf/initfini.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h
index dd21dfbb9c..99109f7a83 100644
--- a/sysdeps/sh/dl-machine.h
+++ b/sysdeps/sh/dl-machine.h
@@ -433,7 +433,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
#ifndef RTLD_BOOTSTRAP
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
#endif
- *reloc_addr = map->l_addr + reloc->r_addend;
+ {
+ if (reloc->r_addend)
+ *reloc_addr = map->l_addr + reloc->r_addend;
+ else
+ *reloc_addr += map->l_addr;
+ }
}
else if (ELF32_R_TYPE (reloc->r_info) != R_SH_NONE)
{
diff --git a/sysdeps/sh/elf/initfini.c b/sysdeps/sh/elf/initfini.c
index 0660c2cd8c..e1ec92176e 100644
--- a/sysdeps/sh/elf/initfini.c
+++ b/sysdeps/sh/elf/initfini.c
@@ -80,6 +80,12 @@ _init:
.L23:
.long __gmon_start__
#endif
+ .data
+ .global __fpscr_values
+__fpscr_values:
+ .long 0
+ .long 0x80000
+ .previous
1:
ALIGN
END_INIT
@@ -114,7 +120,7 @@ __gmon_start__:
.global _fini
.type _fini,@function
_fini:
- mov.l r12,@-$r15
+ mov.l r12,@-r15
mov.l r14,@-r15
sts.l pr,@-r15
#ifdef SHARED