summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-04-10 22:43:01 -0400
committerUlrich Drepper <drepper@gmail.com>2011-04-10 22:43:01 -0400
commite6c61494125126d2ba77e5d99f83887a2ed49783 (patch)
tree1e1b67f306fd7acb967f9d9df32a0296f2ad9d79 /sysdeps
parentc6489db3bdd6e484edcb34884955110612966997 (diff)
downloadglibc-e6c61494125126d2ba77e5d99f83887a2ed49783.tar.gz
Fix memory leak in TLS of loaded objects.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/dl-tls.h5
-rw-r--r--sysdeps/ia64/dl-tls.h5
-rw-r--r--sysdeps/powerpc/dl-tls.h5
-rw-r--r--sysdeps/s390/dl-tls.h7
-rw-r--r--sysdeps/sh/dl-tls.h5
-rw-r--r--sysdeps/sparc/dl-tls.h5
-rw-r--r--sysdeps/x86_64/dl-tls.h5
7 files changed, 29 insertions, 8 deletions
diff --git a/sysdeps/i386/dl-tls.h b/sysdeps/i386/dl-tls.h
index 58705c778d..21b949bd12 100644
--- a/sysdeps/i386/dl-tls.h
+++ b/sysdeps/i386/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. i386 version.
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -58,3 +58,6 @@ strong_alias (___tls_get_addr, ___tls_get_addr_internal)
# endif
#endif
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/sysdeps/ia64/dl-tls.h b/sysdeps/ia64/dl-tls.h
index 26f3d2adf1..5e9a165d7a 100644
--- a/sysdeps/ia64/dl-tls.h
+++ b/sysdeps/ia64/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. IA-64 version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,3 +28,6 @@
#define DONT_USE_TLS_INDEX 1
extern void *__tls_get_addr (size_t m, size_t offset);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/sysdeps/powerpc/dl-tls.h b/sysdeps/powerpc/dl-tls.h
index 957d4b4b96..9ab81f9965 100644
--- a/sysdeps/powerpc/dl-tls.h
+++ b/sysdeps/powerpc/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. PowerPC version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -47,3 +47,6 @@ extern void *__tls_get_addr (tls_index *ti);
# define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET)
# define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET)
#endif
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/sysdeps/s390/dl-tls.h b/sysdeps/s390/dl-tls.h
index 0560462857..7295abc6bb 100644
--- a/sysdeps/s390/dl-tls.h
+++ b/sysdeps/s390/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. s390 version.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -72,6 +72,9 @@ __tls_get_offset:\n\
# define __TLS_GET_ADDR(__ti) \
({ extern char _GLOBAL_OFFSET_TABLE_[] attribute_hidden; \
(void *) __tls_get_offset ((char *) (__ti) - _GLOBAL_OFFSET_TABLE_) \
- + (unsigned long) __builtin_thread_pointer (); })
+ + (unsigned long) __builtin_thread_pointer (); })
#endif
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/sysdeps/sh/dl-tls.h b/sysdeps/sh/dl-tls.h
index 98e2f19046..cf607903d9 100644
--- a/sysdeps/sh/dl-tls.h
+++ b/sysdeps/sh/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. SH version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,6 @@ typedef struct
extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/sysdeps/sparc/dl-tls.h b/sysdeps/sparc/dl-tls.h
index 6edf8d5252..fb2535e1c6 100644
--- a/sysdeps/sparc/dl-tls.h
+++ b/sysdeps/sparc/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. SPARC version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,6 @@ typedef struct
extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/sysdeps/x86_64/dl-tls.h b/sysdeps/x86_64/dl-tls.h
index 9b389edb4a..c382cd8482 100644
--- a/sysdeps/x86_64/dl-tls.h
+++ b/sysdeps/x86_64/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. x86-64 version.
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,6 @@ typedef struct dl_tls_index
extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)