summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-10-17 12:10:17 +0000
committerRoland McGrath <roland@gnu.org>2002-10-17 12:10:17 +0000
commit2430d57a13f4f10312e13c58962cd9104e6428fd (patch)
tree6690ca0a7115c798e9c34cf24f55acf14311d661 /sysdeps/i386
parentd29724f8706e4e46994d6fabafc8389f7624cd0f (diff)
downloadglibc-2430d57a13f4f10312e13c58962cd9104e6428fd.tar.gz
glibc-2430d57a13f4f10312e13c58962cd9104e6428fd.tar.xz
glibc-2430d57a13f4f10312e13c58962cd9104e6428fd.zip
* elf/dl-load.c (_dl_map_object_from_fd): Don't check DF_STATIC_TLS.
	* elf/dl-reloc.c (_dl_relocate_object: CHECK_STATIC_TLS): New macro
	to signal error if an IE-model TLS reloc resolved to a dlopen'd module.
	* sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela):
	Call it after performing TPOFF relocs.
	* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
	* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
	* elf/dl-conflict.c (CHECK_STATIC_TLS): New macro (no-op).

	* elf/dl-close.c (remove_slotinfo): Change asserts so as not to crash
	when closing a partially-initialized object.

	* elf/dl-load.c (_dl_map_object_from_fd) [! USE_TLS]: Call lose
	instead of _dl_fatal_printf when we see PT_TLS.
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/dl-machine.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 6f60cf3af0..60122c5324 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -432,6 +432,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	     Therefore the offset is already correct.  */
 	  if (sym != NULL)
 	    *reloc_addr = sym->st_value;
+	  CHECK_STATIC_TLS (map, sym_map);
 # endif
 	  break;
 	case R_386_TLS_TPOFF32:
@@ -445,6 +446,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	     block we subtract the offset from that of the TLS block.  */
 	  if (sym != NULL)
 	    *reloc_addr += sym_map->l_tls_offset - sym->st_value;
+	  CHECK_STATIC_TLS (map, sym_map);
 # endif
 	  break;
 	case R_386_TLS_TPOFF:
@@ -457,6 +459,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	     thread pointer.  */
 	  if (sym != NULL)
 	    *reloc_addr += sym->st_value - sym_map->l_tls_offset;
+	  CHECK_STATIC_TLS (map, sym_map);
 # endif
 	  break;
 #endif	/* use TLS */
@@ -549,6 +552,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	  *reloc_addr
 	    = (sym == NULL ? 0 : sym_map->l_tls_offset - sym->st_value)
 	      + reloc->r_addend;
+	  CHECK_STATIC_TLS (map, sym_map);
 	  break;
 	case R_386_TLS_TPOFF:
 	  /* The offset is negative, forward from the thread pointer.  */
@@ -558,6 +562,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	  *reloc_addr
 	    = (sym == NULL ? 0 : sym->st_value - sym_map->l_tls_offset)
 	      + reloc->r_addend;
+	  CHECK_STATIC_TLS (map, sym_map);
 	  break;
 #endif	/* use TLS */
 	default: