diff options
author | des <des@FreeBSD.org> | 2013-09-21 21:03:52 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2013-09-21 21:03:52 +0000 |
commit | b4fc46964b2d3d8a8685e2629da09f13748dd548 (patch) | |
tree | d9806f4ace92c72d22e964e58648a434d081155c /libexec | |
parent | 497ee46bc7673130423fc2967f992914bb690cbf (diff) | |
download | FreeBSD-src-b4fc46964b2d3d8a8685e2629da09f13748dd548.zip FreeBSD-src-b4fc46964b2d3d8a8685e2629da09f13748dd548.tar.gz |
Make the directory mapping functionality, which was previously only
available in 32-bit compatibility mode, unconditional.
Overhaul the man page, which had evolved more by accretion than by design.
Approved by: re (gjb)
MFC after: 3 weeks
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rtld-elf/libmap.c | 2 | ||||
-rw-r--r-- | libexec/rtld-elf/libmap.h | 2 | ||||
-rw-r--r-- | libexec/rtld-elf/rtld.c | 10 |
3 files changed, 5 insertions, 9 deletions
diff --git a/libexec/rtld-elf/libmap.c b/libexec/rtld-elf/libmap.c index 29dc538..2e1f3c6 100644 --- a/libexec/rtld-elf/libmap.c +++ b/libexec/rtld-elf/libmap.c @@ -396,7 +396,6 @@ lm_find (const char *p, const char *f) /* Given a libmap translation list and a library name, return the replacement library, or NULL */ -#ifdef COMPAT_32BIT char * lm_findn (const char *p, const char *f, const int n) { @@ -413,7 +412,6 @@ lm_findn (const char *p, const char *f, const int n) free(s); return (t); } -#endif static char * lml_find (struct lm_list *lmh, const char *f) diff --git a/libexec/rtld-elf/libmap.h b/libexec/rtld-elf/libmap.h index 53b2ba1..54b4a2f 100644 --- a/libexec/rtld-elf/libmap.h +++ b/libexec/rtld-elf/libmap.h @@ -5,6 +5,4 @@ int lm_init (char *); void lm_fini (void); char * lm_find (const char *, const char *); -#ifdef COMPAT_32BIT char * lm_findn (const char *, const char *, const int); -#endif diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 2da990c..cd18bad 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2581,12 +2581,14 @@ rtld_exit(void) lock_release(rtld_bind_lock, &lockstate); } +/* + * Iterate over a search path, translate each element, and invoke the + * callback on the result. + */ static void * path_enumerate(const char *path, path_enum_proc callback, void *arg) { -#ifdef COMPAT_32BIT const char *trans; -#endif if (path == NULL) return (NULL); @@ -2596,13 +2598,11 @@ path_enumerate(const char *path, path_enum_proc callback, void *arg) char *res; len = strcspn(path, ":;"); -#ifdef COMPAT_32BIT trans = lm_findn(NULL, path, len); if (trans) res = callback(trans, strlen(trans), arg); else -#endif - res = callback(path, len, arg); + res = callback(path, len, arg); if (res != NULL) return (res); |