From owner-freebsd-ports@FreeBSD.ORG Sat Oct 15 00:41:49 2005 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E9BA16A41F; Sat, 15 Oct 2005 00:41:49 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0A7A43D45; Sat, 15 Oct 2005 00:41:48 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from pelsia.ninth-nine.com (d110.GkanagawaFL7.vectant.ne.jp [202.215.69.110]) (authenticated bits=0) by sakura.ninth-nine.com (8.13.3/8.13.3/NinthNine) with ESMTP id j9F0ffW3086495; Sat, 15 Oct 2005 09:41:47 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Sat, 15 Oct 2005 09:41:41 +0900 (JST) Message-Id: <200510150041.j9F0ffW3086495@sakura.ninth-nine.com> From: Norikatsu Shigemura To: freebsd-hackers@FreeBSD.org X-Mailer: Sylpheed version 2.0.2 (GTK+ 2.6.10; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0 (sakura.ninth-nine.com [219.127.74.120]); Sat, 15 Oct 2005 09:41:47 +0900 (JST) Cc: freebsd-gnome@FreeBSD.org, freebsd-ports@FreeBSD.org Subject: Can ldd(1) list non-FreeBSD dynamic object dependencies? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2005 00:41:49 -0000 Hi FreeBSD hackers! I think that ldd(1) may list non-FreeBSD dynamic object dependencies. Do you think? If ldd(1) can list these, Linux Plugin Wrapper is more interested. Because you can confirm LPW enabled by ldd(1) like following lines: $ ldd /usr/X11R6/lib/linux-flashplugin6/libflashplayer.so ldd: /usr/X11R6/lib/linux-flashplugin6/libflashplayer.so: not a FreeBSD ELF shared object(OS type=0) /usr/X11R6/lib/linux-flashplugin6/libflashplayer.so: libpthread.so.0 => /usr/local/lib/pluginwrapper/flash6.so (0x68391000) libz.so.1 => /lib/libz.so.3 (0x68394000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x683a5000) libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x68471000) libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x6847f000) libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++.so.5 (0x684d1000) libm.so.6 => /lib/libm.so.4 (0x685a4000) libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x685bb000) libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x685c4000) In ldd(1)'s current source #178 lines: >>if (hdr.elf.e_ident[EI_OSABI] & ELFOSABI_FREEBSD) { I think & is a typo. It sould be ==. And I suggest following code: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } else if (hdr.elf.e_type == ET_DYN) { is_shlib = 1; if (hdr.elf.e_ident[EI_OSABI] != ELFOSABI_FREEBSD) { warnx("%s: not a FreeBSD ELF shared " "object(OS type=%d)", *argv, hdr.elf.e_ident[EI_OSABI]); /+ file_ok = 0; */ } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -