summaryrefslogtreecommitdiff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-07 08:39:57 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-07 08:39:57 +0000
commitc31e278f8636fbe11ad933d9089e98361665a978 (patch)
tree5101942451f1417f14d3f4b0702ee101464a50c4 /elf/rtld.c
parent021723ab784461de9eac57398ea16a47d4ab9366 (diff)
Update.
2004-03-07 Ulrich Drepper <drepper@redhat.com> * sysdeps/generic/ldsodefs.h: Move _dl_initial_searclist, _dl_hp_timing_overhead, _dl_init_all_dirs, and the content of dl-procinfo.c from _rtld_global to _rtld_global_ro. * elf/rtld.c: Adjust initializer for _rtld_global_ro. * elf/dl-close.c: Use GLRO instead of GL where appropriate. * elf/dl-libc.c: Likewise. * elf/dl-load.c: Likewise. * sysdeps/i386/dl-procinfo.h: Likewise. * sysdeps/i386/i686/hp-timing.h: Likewise. * sysdeps/ia64/hp-timing.h: Likewise. * sysdeps/sparc/sparc32/sparcv9/hp-timing.h: Likewise. * sysdeps/sparc/sparc64/hp-timing.h: Likewise. * sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Likewise. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise.
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 87d3958679..c9b9c1be80 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -93,8 +93,6 @@ INTVARDEF(_dl_starting_up)
(except those which cannot be added for some reason). */
struct rtld_global _rtld_global =
{
- /* Get architecture specific initializer. */
-#include <dl-procinfo.c>
/* Default presumption without further information is executable stack. */
._dl_stack_flags = PF_R|PF_W|PF_X,
#ifdef _LIBC_REENTRANT
@@ -113,6 +111,8 @@ extern struct rtld_global _rtld_local
read-only after relocation. */
struct rtld_global_ro _rtld_global_ro attribute_relro =
{
+ /* Get architecture specific initializer. */
+#include <dl-procinfo.c>
#ifdef NEED_DL_SYSINFO
._dl_sysinfo = DL_SYSINFO_DEFAULT,
#endif
@@ -1720,6 +1720,14 @@ cannot allocate TLS data structures for initial thread");
#endif
}
+ /* Now set up the variable which helps the assembler startup code. */
+ GL(dl_main_searchlist) = &GL(dl_loaded)->l_searchlist;
+ GL(dl_global_scope)[0] = &GL(dl_loaded)->l_searchlist;
+
+ /* Save the information about the original global scope list since
+ we need it in the memory handling later. */
+ GLRO(dl_initial_searchlist) = *GL(dl_main_searchlist);
+
if (prelinked)
{
struct link_map *l;
@@ -1833,14 +1841,6 @@ cannot allocate TLS data structures for initial thread");
}
}
- /* Now set up the variable which helps the assembler startup code. */
- GL(dl_main_searchlist) = &GL(dl_loaded)->l_searchlist;
- GL(dl_global_scope)[0] = &GL(dl_loaded)->l_searchlist;
-
- /* Save the information about the original global scope list since
- we need it in the memory handling later. */
- GL(dl_initial_searchlist) = *GL(dl_main_searchlist);
-
#ifndef NONTLS_INIT_TP
# define NONTLS_INIT_TP do { } while (0)
#endif