summary refs log tree commit diff
path: root/sysdeps/sh/dl-machine.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-10-02 06:22:02 +0000
committerUlrich Drepper <drepper@redhat.com>2002-10-02 06:22:02 +0000
commitaa298c0874c545acf0fc40f8d544cb96f0270990 (patch)
tree6c96da4360d92f1976c4d952d4db77f0235b02e8 /sysdeps/sh/dl-machine.h
parent0674eb08eee7e4f8c9c31877b9579e7ab7a23f72 (diff)
downloadglibc-aa298c0874c545acf0fc40f8d544cb96f0270990.tar.gz
glibc-aa298c0874c545acf0fc40f8d544cb96f0270990.tar.xz
glibc-aa298c0874c545acf0fc40f8d544cb96f0270990.zip
Update.
2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
	* sysdeps/sh/tls.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/smp.h: New file.
Diffstat (limited to 'sysdeps/sh/dl-machine.h')
-rw-r--r--sysdeps/sh/dl-machine.h7
1 files changed, 4 insertions, 3 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 */