diff options
Diffstat (limited to 'sysdeps/sh')
-rw-r--r-- | sysdeps/sh/dl-machine.h | 7 | ||||
-rw-r--r-- | sysdeps/sh/elf/initfini.c | 6 | ||||
-rw-r--r-- | sysdeps/sh/elf/start.S | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/sysdeps/sh/dl-machine.h b/sysdeps/sh/dl-machine.h index 483b42f9f3..350ac5297a 100644 --- a/sysdeps/sh/dl-machine.h +++ b/sysdeps/sh/dl-machine.h @@ -573,14 +573,15 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_SH_TLS_TPOFF32: /* The offset is positive, afterward from the thread pointer. */ # ifdef RTLD_BOOTSTRAP - *reloc_addr = map->l_tls_offset + sym->st_value; + *reloc_addr = map->l_tls_offset + sym->st_value + reloc->r_addend; # else /* We know the offset of object the symbol is contained in. It is a positive value which will be added to the thread pointer. To get the variable position in the TLS block we add the offset from that of the TLS block. */ - if (sym_map != NULL && sym != NULL) - *reloc_addr = sym_map->l_tls_offset + sym->st_value; + *reloc_addr + = ((sym == NULL ? 0 : sym_map->l_tls_offset + sym->st_value) + + reloc->r_addend); # endif break; #endif /* use TLS */ diff --git a/sysdeps/sh/elf/initfini.c b/sysdeps/sh/elf/initfini.c index d70730ec1c..b41c7ecdd2 100644 --- a/sysdeps/sh/elf/initfini.c +++ b/sysdeps/sh/elf/initfini.c @@ -71,12 +71,6 @@ _init: .L23: .long __gmon_start__ #endif - .data - .global __fpscr_values -__fpscr_values: - .long 0 - .long 0x80000 - .previous 1: ALIGN END_INIT diff --git a/sysdeps/sh/elf/start.S b/sysdeps/sh/elf/start.S index aef4160c92..5bcb08f236 100644 --- a/sysdeps/sh/elf/start.S +++ b/sysdeps/sh/elf/start.S @@ -89,3 +89,7 @@ __data_start: .long 0 .weak data_start data_start = __data_start + .global __fpscr_values +__fpscr_values: + .long 0 + .long 0x80000 |