From b4fc46964b2d3d8a8685e2629da09f13748dd548 Mon Sep 17 00:00:00 2001 From: des Date: Sat, 21 Sep 2013 21:03:52 +0000 Subject: 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 --- libexec/rtld-elf/rtld.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libexec/rtld-elf/rtld.c') 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); -- cgit v1.1