summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-09-18 01:18:08 +0000
committerRoland McGrath <roland@gnu.org>2002-09-18 01:18:08 +0000
commit1d0ad7736265961192d5f7db11d55b49392c0936 (patch)
tree2f0beed71291665ad25cc03c572964b4d7753afc /elf
parentc843e065a1658d1a6d55a0f0b3befd200c3ec595 (diff)
downloadglibc-1d0ad7736265961192d5f7db11d55b49392c0936.tar.gz
glibc-1d0ad7736265961192d5f7db11d55b49392c0936.tar.xz
glibc-1d0ad7736265961192d5f7db11d55b49392c0936.zip
* elf/dl-lookup.c (_dl_debug_bindings): Print TLS lookups always.
	* elf/elf.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE,
	R_386_TLS_LE): Define.
	(R_386_TLS_IE_32, R_386_TLS_LE_32, R_386_TLS_TPOFF32): Update
	comments.
	* sysdeps/i386/dl-machine.h (elf_machine_type_class): Return
	ELF_RTYPE_CLASS_PLT for R_386_TLS_TPOFF.
	(elf_machine_rel): Handle R_386_TLS_TPOFF.
	(elf_machine_rela): Likewise.
	Remove unnecessary RTLD_BOOTSTRAP #ifdefs.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-lookup.c16
-rw-r--r--elf/elf.h17
2 files changed, 21 insertions, 12 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 6f14aaf498..e2f5506030 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -647,9 +647,17 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 	    conflict = 1;
 	}
 
+#ifdef USE_TLS
+      if (value->s
+	  && (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info)
+				== STT_TLS, 0)))
+	type_class = 4;
+#endif
+
       if (conflict
 	  || GL(dl_trace_prelink_map) == undef_map
-	  || GL(dl_trace_prelink_map) == NULL)
+	  || GL(dl_trace_prelink_map) == NULL
+	  || type_class == 4)
 	{
 	  _dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ",
 		      conflict ? "conflict" : "lookup",
@@ -668,12 +676,6 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 			(int) sizeof (ElfW(Addr)) * 2,
 			(ElfW(Addr)) (val.s ? val.s->st_value : 0));
 
-#ifdef USE_TLS
-          if (value->s
-	      && (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info)
-				    == STT_TLS, 0)))
-	    type_class = 4;
-#endif
 	  _dl_printf ("/%x %s\n", type_class, undef_name);
 	}
     }
diff --git a/elf/elf.h b/elf/elf.h
index 2edf8e081b..b664c5d279 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1073,6 +1073,13 @@ typedef struct
 #define R_386_GOTOFF	   9		/* 32 bit offset to GOT */
 #define R_386_GOTPC	   10		/* 32 bit PC relative offset to GOT */
 #define R_386_32PLT	   11
+#define R_386_TLS_TPOFF	   14		/* Offset in static TLS block */
+#define R_386_TLS_IE	   15		/* Address of GOT entry for static TLS
+					   block offset */
+#define R_386_TLS_GOTIE	   16		/* GOT entry for static TLS block
+					   offset */
+#define R_386_TLS_LE	   17		/* Offset relative to static TLS
+					   block */
 #define R_386_TLS_GD	   18		/* Direct 32 bit for GNU version of
 					   general dynamic thread local data */
 #define R_386_TLS_LDM	   19		/* Direct 32 bit for GNU version of
@@ -1095,13 +1102,13 @@ typedef struct
 					   __tls_get_addr() in LDM code */
 #define R_386_TLS_LDM_POP  31		/* Tag for popl in LDM TLS code */
 #define R_386_TLS_LDO_32   32		/* Offset relative to TLS block */
-#define R_386_TLS_IE_32	   33		/* GOT entry for static TLS block
-					   offset */
-#define R_386_TLS_LE_32	   34		/* Offset relative to static TLS
-					   block */
+#define R_386_TLS_IE_32	   33		/* GOT entry for negated static TLS
+					   block offset */
+#define R_386_TLS_LE_32	   34		/* Negated offset relative to static
+					   TLS block */
 #define R_386_TLS_DTPMOD32 35		/* ID of module containing symbol */
 #define R_386_TLS_DTPOFF32 36		/* Offset in TLS block */
-#define R_386_TLS_TPOFF32  37		/* Offset in static TLS block */
+#define R_386_TLS_TPOFF32  37		/* Negated offset in static TLS block */
 /* Keep this the last entry.  */
 #define R_386_NUM	   38