summaryrefslogtreecommitdiffstats
path: root/ldso
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
parent5418ef694ee17c698270702d927f04836706e60b (diff)
parent8739ed0a9b6597e7106f878ec159a19fe0848f23 (diff)
downloaduClibc-alpine-8359f22a288236613e64f2b3e96ef6e2ac2de097.tar.bz2
uClibc-alpine-8359f22a288236613e64f2b3e96ef6e2ac2de097.tar.xz
Merge remote branch 'origin/master' into nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/dl-elf.c2
-rw-r--r--ldso/ldso/ldso.c25
2 files changed, 14 insertions, 13 deletions
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index e7cb138d4..6bf5bbd6a 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -376,7 +376,7 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure,
}
}
header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
if (_dl_mmap_check_error(header)) {
_dl_dprintf(2, "%s:%i: can't map '%s'\n", _dl_progname, __LINE__, libname);
_dl_internal_error_number = LD_ERROR_MMAP_FAILED;
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. */