summaryrefslogtreecommitdiff
path: root/ldso/libdl/libdl.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-27 22:58:52 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-27 22:58:52 +0000
commit237277e9a8133c64026b736b1427141e71655330 (patch)
tree43d2f15804d486c56d7fba35c97b6d38ccc9fc6d /ldso/libdl/libdl.c
parent6e3a0044cc3b4d6f3f13f2d9d1d0a83d60ca800f (diff)
Moved guard_setup to dl-osinfo.h (used commonly by ldso and libc). Renamed to _dl_setup_stack_chk_guard, as in glibc. SSP requires now binutils-2.16.1 and newer. Add NOT_IN_libc/IS_IN_libc. Began using -DSHARED in uClibc_main.c, there are more candidates in there. Move back dl_protect_relro to it's earlier place.
Diffstat (limited to 'ldso/libdl/libdl.c')
-rw-r--r--ldso/libdl/libdl.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 12de25fd0..5efe36155 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -346,6 +346,15 @@ void *dlopen(const char *libname, int flag)
if (_dl_fixup(dyn_chain, now_flag))
goto oops;
+ if (relro_ptr) {
+ for (rpnt = relro_ptr->next; rpnt; rpnt = rpnt->next) {
+ if (rpnt->dyn->relro_size)
+ _dl_protect_relro(rpnt->dyn);
+ }
+ }
+ /* TODO: Should we set the protections of all pages back to R/O now ? */
+
+
/* Notify the debugger we have added some objects. */
if (_dl_debug_addr) {
dl_brk = (void (*)(void)) _dl_debug_addr->r_brk;
@@ -376,15 +385,7 @@ void *dlopen(const char *libname, int flag)
}
}
}
-#endif
-
- if (relro_ptr) {
- for (rpnt = relro_ptr->next; rpnt; rpnt = rpnt->next) {
- if (rpnt->dyn->relro_size)
- _dl_protect_relro(rpnt->dyn);
- }
- }
- /* TODO: Should we set the protections of all pages back to R/O now ? */
+#endif /* SHARED */
_dl_unmap_cache();
return (void *) dyn_chain;