aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c2
-rw-r--r--elf/rtld.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 0b6e96f998..ecf2ee87eb 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1129,7 +1129,7 @@ cannot allocate TLS data structures for initial thread");
{
/* This object is loaded at a fixed address. This must never
happen for objects loaded with dlopen(). */
- if (__builtin_expect (mode & __RTLD_DLOPEN, 0))
+ if (__builtin_expect ((mode & __RTLD_OPENEXEC) == 0, 0))
{
errstring = N_("cannot dynamically load executable");
goto call_lose;
diff --git a/elf/rtld.c b/elf/rtld.c
index 7c4d961dbd..344fedeb95 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -787,7 +787,8 @@ of this helper program; chances are you did not intend to run this program.\n\
else
{
HP_TIMING_NOW (start);
- INTUSE(_dl_map_object) (NULL, rtld_progname, 0, lt_library, 0, 0);
+ INTUSE(_dl_map_object) (NULL, rtld_progname, 0, lt_library, 0,
+ __RTLD_OPENEXEC);
HP_TIMING_NOW (stop);
HP_TIMING_DIFF (load_time, start, stop);