summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-09-22 04:58:19 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-09-22 04:58:19 +0000
commit22f80f9d6304846e4ce4c9e3e99319e1cb961fb5 (patch)
treeb35a07d605101954f72eba9b9c36155aa68e72aa /libexec
parent11da46f5f951dae2ff65d9fb47a8e30cdc09627f (diff)
Upon futher contemplation, the notion of unmaphints is just wrong.
First the maphints code is not cleaning up after itself, by leaving a file descriptor open and trying to clean up after the dynamic linker is done loading by removing data needed during dlopen() is nonsense. the _dl_unmaphints() function and it's references have been removed. _dl_maphints() now cleans up it's file descriptor before returning. static data used later during dlopen() is left intact.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/loader.c4
-rw-r--r--libexec/ld.so/sod.c14
2 files changed, 4 insertions, 14 deletions
diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c
index eb0876f25cc..007fd088eb5 100644
--- a/libexec/ld.so/loader.c
+++ b/libexec/ld.so/loader.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: loader.c,v 1.18 2001/09/15 20:44:52 drahn Exp $ */
+/* $OpenBSD: loader.c,v 1.19 2001/09/22 04:58:18 drahn Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -68,7 +68,6 @@ char *_dl_debug;
char *_dl_showmap;
struct r_debug *_dl_debug_map;
-void _dl_unmaphints();
void
_dl_debug_state(void)
@@ -291,7 +290,6 @@ _dl_boot(const char **argv, const char **envp, const long loff,
_dl_show_objects();
DL_DEB(("dynamic loading done.\n"));
}
- _dl_unmaphints();
if (_dl_traceld) {
_dl_exit(0);
}
diff --git a/libexec/ld.so/sod.c b/libexec/ld.so/sod.c
index 96fe1159a25..ca84e135865 100644
--- a/libexec/ld.so/sod.c
+++ b/libexec/ld.so/sod.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sod.c,v 1.6 2001/09/22 04:29:32 drahn Exp $ */
+/* $OpenBSD: sod.c,v 1.7 2001/09/22 04:58:18 drahn Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -187,17 +187,9 @@ _dl_maphints()
hstrtab = (char *)(addr + hheader->hh_strtab);
if (hheader->hh_version >= LD_HINTS_VERSION_2)
hint_search_path = hstrtab + hheader->hh_dirlist;
-}
-
-void
-_dl_unmaphints()
-{
- if (HINTS_VALID) {
- if (hfd != 0)
- _dl_close(hfd);
- hfd = 0;
- }
+ /* close the file descriptor, leaving the hints mapped */
+ _dl_close(hfd);
}
char *