]> Zhao Yanbai Git Server - minix.git/commitdiff
allow ldd mmap fallback 30/630/2
authorAnton Kuijsten <anton@kuijsten.info>
Wed, 12 Jun 2013 05:58:46 +0000 (05:58 +0000)
committerBen Gras <ben@minix3.org>
Wed, 12 Jun 2013 07:05:11 +0000 (07:05 +0000)
Change-Id: Ia7b8aa88c3f063c804869065719ac0cbf049b7dd

libexec/ld.elf_so/map_object.c
usr.bin/ldd/Makefile.elf

index fad5e426524d0f8da4db39e790a8dfecc3ee87c8..5e17fad362432661c250a59877f718a0379648a9 100644 (file)
@@ -138,7 +138,7 @@ _rtld_map_object(const char *path, int fd, const struct stat *sb)
            (off_t)0);
        obj->ehdr = ehdr;
        if (ehdr == MAP_FAILED) {
-#if defined(__minix) && defined(RTLD_LOADER)
+#if defined(__minix) && (defined(RTLD_LOADER) || defined(LDD))
                return _rtld_map_object_fallback(path, fd, sb);
 #else
                _rtld_error("%s: read error: %s", path, xstrerror(errno));
index b3ac1532f1d2507596b9b71f050503fb0ffbe370..ddacae819ccce3877b7bf49310024c5bffa483be 100644 (file)
@@ -4,7 +4,9 @@
 # Expects CPPFLAGS to have ELFSIZE set, and LIB to be set.
 
 SRCS=  ldd_elfxx.c
-SRCS+= xmalloc.c debug.c expand.c map_object.c load.c search.c \
+SRCS+= xmalloc.c debug.c expand.c map_object_fallback.c map_object.c load.c search.c \
        headers.c paths.c
 
+CPPFLAGS+=     -DLDD
+
 .include "Makefile.common"