Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ldd apply kludge to make this more or less work on m...



details:   https://anonhg.NetBSD.org/src/rev/e0e48058fb19
branches:  trunk
changeset: 785562:e0e48058fb19
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Mar 20 15:18:42 2013 +0000

description:
apply kludge to make this more or less work on mips64 with n32 userland
with this ldd can handle both 64 and n32 binaries ( previously it would do 64
only ), o32 support is still broken
Someone more familiar with this code needs to fix this properly.

diffstat:

 usr.bin/ldd/Makefile.inc |  4 ++--
 usr.bin/ldd/ldd.c        |  8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r 81668d949500 -r e0e48058fb19 usr.bin/ldd/Makefile.inc
--- a/usr.bin/ldd/Makefile.inc  Wed Mar 20 14:47:20 2013 +0000
+++ b/usr.bin/ldd/Makefile.inc  Wed Mar 20 15:18:42 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.4 2009/12/15 04:06:43 mrg Exp $
+#      $NetBSD: Makefile.inc,v 1.5 2013/03/20 15:18:42 macallan Exp $
 
 WARNS?=        3       # XXX: -Wsign-compare issues ld.elf_so source
 
@@ -18,7 +18,7 @@
 .if (${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el")
 MLIBDIR=       64
 COMPAT_MLIBDIR=        o32
-CPPFLAGS+= -DLDD_ELF64
+CPPFLAGS+= -DLDD_ELF64 -DMIPS_N32
 .endif
 
 .if exists(${.CURDIR}/../../Makefile.inc)
diff -r 81668d949500 -r e0e48058fb19 usr.bin/ldd/ldd.c
--- a/usr.bin/ldd/ldd.c Wed Mar 20 14:47:20 2013 +0000
+++ b/usr.bin/ldd/ldd.c Wed Mar 20 15:18:42 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ldd.c,v 1.20 2012/07/08 00:53:44 matt Exp $    */
+/*     $NetBSD: ldd.c,v 1.21 2013/03/20 15:18:42 macallan Exp $        */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ldd.c,v 1.20 2012/07/08 00:53:44 matt Exp $");
+__RCSID("$NetBSD: ldd.c,v 1.21 2013/03/20 15:18:42 macallan Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -165,9 +165,9 @@
                }
                if (elf_ldd(fd, *argv, fmt1, fmt2) == -1
                    /* Alpha never had 32 bit support. */
-#if defined(_LP64) && !defined(__alpha__)
+#if (defined(_LP64) && !defined(__alpha__)) || defined(MIPS_N32)
                    && elf32_ldd(fd, *argv, fmt1, fmt2) == -1
-#ifdef __mips__
+#if defined(__mips__) && 0 /* XXX this is still hosed for some reason */
                    && elf32_ldd_compat(fd, *argv, fmt1, fmt2) == -1
 #endif
 #endif



Home | Main Index | Thread Index | Old Index