summaryrefslogtreecommitdiff
path: root/ldso/libdl
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-06-01 14:57:14 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-06-01 14:57:14 +0000
commit00b6ddf079f1207501a822d134eacc0cb0083fea (patch)
treed730393f5eda758254020d204a5eebfd83dfb2e3 /ldso/libdl
parent61c12b27780e5aec8d4535d5d35bf58765ef4c26 (diff)
Add debug printout of RTLD_GLOBAL and RTLD_NOW flag.
Diffstat (limited to 'ldso/libdl')
-rw-r--r--ldso/libdl/libdl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 78da63c38..0064cedbc 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -171,10 +171,15 @@ void *dlopen(const char *libname, int flag)
for(rpnt = _dl_symbol_tables; rpnt->next; rpnt=rpnt->next);
relro_ptr = rpnt;
+ now_flag = (flag & RTLD_NOW) ? RTLD_NOW : 0;
+ if (getenv("LD_BIND_NOW"))
+ now_flag = RTLD_NOW;
+
/* Try to load the specified library */
#ifdef __SUPPORT_LD_DEBUG__
if(_dl_debug)
- fprintf(stderr, "Trying to dlopen '%s'\n", (char*)libname);
+ fprintf(stderr, "Trying to dlopen '%s', RTLD_GLOBAL:%d RTLD_NOW:%d\n", (char*)libname,
+ flag & RTLD_GLOBAL ? 1:0, now_flag & RTLD_NOW ? 1:0);
#endif
tpnt = _dl_load_shared_library(0, &rpnt, tfrom, (char*)libname, 0);
@@ -343,10 +348,6 @@ void *dlopen(const char *libname, int flag)
* Now we go through and look for REL and RELA records that indicate fixups
* to the GOT tables. We need to do this in reverse order so that COPY
* directives work correctly */
- now_flag = (flag & RTLD_NOW) ? RTLD_NOW : 0;
- if (getenv("LD_BIND_NOW"))
- now_flag = RTLD_NOW;
-
#ifdef __mips__
/*
* Relocation of the GOT entries for MIPS have to be done