aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-06 00:55:46 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-06 00:55:46 +0000
commitec70c011557d0964dfc528d2d326d75526aec123 (patch)
treeca3440c580f185559c2d0508f968f27ee1630b45 /elf/dl-load.c
parent472d82fc06664bea2859cb94b4469c48af2d10d1 (diff)
downloadglibc-ec70c011557d0964dfc528d2d326d75526aec123.tar
glibc-ec70c011557d0964dfc528d2d326d75526aec123.tar.gz
glibc-ec70c011557d0964dfc528d2d326d75526aec123.tar.bz2
glibc-ec70c011557d0964dfc528d2d326d75526aec123.zip
Update.
* elf/dl-load.c (_dl_map_object_from_fd): Prevent dynamically loading modules with the DF_STATIC_TLS flag set. * elf/dynamic-link.h (elf_get_dynamic_info): Initialize l_flags element. * include/link.h (struct link_map): Add l_flags field. * elf/elf.h (DF_STATIC_TLS): New definition.
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index a4e2421b6c..6f9ce05d46 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1170,7 +1170,11 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
/* Make sure we are dlopen()ing an object which has the DF_1_NOOPEN
flag set. */
- if (__builtin_expect (l->l_flags_1 & DF_1_NOOPEN, 0)
+ if ((__builtin_expect (l->l_flags_1 & DF_1_NOOPEN, 0)
+#ifdef USE_TLS
+ || __builtin_expect (l->l_flags & DF_STATIC_TLS, 0)
+#endif
+ )
&& (mode & __RTLD_DLOPEN))
{
/* We are not supposed to load this object. Free all resources. */