summaryrefslogtreecommitdiff
path: root/ldso/ldso/ldso.c
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-11-28 22:00:53 -0800
committerAustin Foxley <austinf@cetoncorp.com>2009-11-28 22:40:05 -0800
commit8359f22a288236613e64f2b3e96ef6e2ac2de097 (patch)
tree04967bfdadf913d1f8a70ddf5769446d963546dd /ldso/ldso/ldso.c
parent5418ef694ee17c698270702d927f04836706e60b (diff)
parent8739ed0a9b6597e7106f878ec159a19fe0848f23 (diff)
Merge remote branch 'origin/master' into nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'ldso/ldso/ldso.c')
-rw-r--r--ldso/ldso/ldso.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 555eeb9a1..125cf966c 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -193,7 +193,7 @@ void *_dl_malloc(size_t size)
_dl_debug_early("mmapping more memory\n");
_dl_mmap_zero = _dl_malloc_addr = _dl_mmap((void *) 0, rounded_size,
- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
if (_dl_mmap_check_error(_dl_mmap_zero)) {
_dl_dprintf(_dl_debug_file, "%s: mmap of a spare page failed!\n", _dl_progname);
_dl_exit(20);
@@ -473,19 +473,20 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
/* OK, fill this in - we did not have this before */
if (ppnt->p_type == PT_INTERP) {
- char *ptmp;
-
tpnt->libname = (char *) DL_RELOC_ADDR(app_tpnt->loadaddr, ppnt->p_vaddr);
-
- /* Store the path where the shared lib loader was found
- * for later use
- */
- _dl_ldsopath = _dl_strdup(tpnt->libname);
- ptmp = _dl_strrchr(_dl_ldsopath, '/');
- if (ptmp != _dl_ldsopath)
- *ptmp = '\0';
-
+#ifdef __LDSO_SEARCH_INTERP_PATH__
+ {
+ char *ptmp;
+ /* Store the path where the shared lib loader was found
+ * for later use
+ */
+ _dl_ldsopath = _dl_strdup(tpnt->libname);
+ ptmp = _dl_strrchr(_dl_ldsopath, '/');
+ if (ptmp != _dl_ldsopath)
+ *ptmp = '\0';
+ }
_dl_debug_early("Lib Loader: (%x) %s\n", (unsigned) DL_LOADADDR_BASE(tpnt->loadaddr), tpnt->libname);
+#endif
}
/* Discover any TLS sections if the target supports them. */