summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-03 17:25:28 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-03 17:25:28 +0000
commitfeefb2252ef7ae7c06c041d63727e5039cec2edc (patch)
tree015c9de0f918338aab13770d4b80bf5f4b77a888 /ldso
parent80f876c3fa73314c3d330284bee4cb87a1842e63 (diff)
Move _dl_protect_relro after INIT to allow using attribute_relro within uClibc_init
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/ldso.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 196828ec1..3b678588f 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -705,14 +705,6 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
if (_dl_symbol_tables)
goof += _dl_fixup(_dl_symbol_tables, unlazy);
- for (tpnt = _dl_loaded_modules; tpnt; tpnt = tpnt->next) {
- if (tpnt->relro_size)
- _dl_protect_relro (tpnt);
- }
-
-
-
-
/* OK, at this point things are pretty much ready to run. Now we need
* to touch up a few items that are required, and then we can let the
* user application have at it. Note that the dynamic linker itself
@@ -764,6 +756,11 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
}
}
+ for (tpnt = _dl_loaded_modules; tpnt; tpnt = tpnt->next) {
+ if (tpnt->relro_size)
+ _dl_protect_relro (tpnt);
+ }
+
/* Find the real malloc function and make ldso functions use that from now on */
_dl_malloc_function = (void* (*)(size_t)) (intptr_t) _dl_find_hash("malloc",
_dl_symbol_tables, NULL, ELF_RTYPE_CLASS_PLT);