diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-10-03 17:53:21 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-10-03 17:53:21 +0000 |
commit | 593dca82c9ef2a87777f48f8c7acd09da5457d7d (patch) | |
tree | bfac6d22f2b30c0c998360188134a32a3fdb21f3 | |
parent | dedc7609fa00a6697d4bb6b9a152db71097e8fee (diff) |
Move _dl_protect_relro as in ldso.c, thanks to jocke
-rw-r--r-- | ldso/libdl/libdl.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index edb7c5033..9073b736b 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -346,15 +346,6 @@ 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; @@ -386,6 +377,15 @@ 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 ? */ + _dl_unmap_cache(); return (void *) dyn_chain; |