From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8532 invoked by alias); 14 Apr 2010 09:19:41 -0000 Received: (qmail 8505 invoked by uid 22791); 14 Apr 2010 09:19:40 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Apr 2010 09:19:36 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id A31F4CB030D; Wed, 14 Apr 2010 11:19:34 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VpN+i1WII77Y; Wed, 14 Apr 2010 11:19:34 +0200 (CEST) Received: from dhcp-guest-205.act-europe.fr (dhcp-guest-205.act-europe.fr [10.10.127.205]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 8D876CB0202; Wed, 14 Apr 2010 11:19:34 +0200 (CEST) Subject: Re: [libbfd] Mach-O format support ? Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <20100414181108.40e98561.mpsuzuki@hiroshima-u.ac.jp> Date: Wed, 14 Apr 2010 09:19:00 -0000 Cc: fleury@labri.fr, binutils@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <17AF0F57-CF62-4B48-A4DE-E90BB442AD8F@adacore.com> References: <4BC488C6.8090203@labri.fr> <4BC577D6.6050801@labri.fr> <0708B593-97DB-499D-A89B-ED70E8573F46@adacore.com> <20100414173947.680bc9cc.mpsuzuki@hiroshima-u.ac.jp> <9FD2BC70-88A6-49E2-A7CD-9080A95C0D8F@adacore.com> <20100414181108.40e98561.mpsuzuki@hiroshima-u.ac.jp> To: mpsuzuki@hiroshima-u.ac.jp X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00172.txt.bz2 On Apr 14, 2010, at 11:11 AM, mpsuzuki@hiroshima-u.ac.jp wrote: > Hi, >=20 > On Wed, 14 Apr 2010 10:49:02 +0200 > Tristan Gingold wrote: >>> on Mac OS X, "nm" complains as: >>>=20 >>> $ ./nm-new /usr/lib/libwrap.a=20 >>> ./nm-new: /usr/lib/libwrap.a:i386: File format not recognized >>> ./nm-new: /usr/lib/libwrap.a:powerpc:common: File format not recognized >>=20 >> Yes, nm on universal archive doesn't work, because nm doesn't handle arc= hives of archives! >=20 > Thank you for quick reply! >=20 > It seems that the "ar" of GNU binutils doesn't handle > universal binary archive directly. It can. It just see the universal binary as an archive. Eg: $ ./binutils/ar tv /bin/ls=20 /bin/ls:i386:x86-64 /bin/ls:i386 > I guess the universal > binary archive of Mac OS X is concatenated in fat binary > format, instead of "ar" archive format. Yes, it is a different format. > In fact, even > Apple's "ar" cannot parse the universal binary archive, > it tells to split the universal binary archive by libtool/lipo > and execute "ar" on the splitted files. >=20 > Is there GNU replacement of Apple's lipo? You can use binutils ar to list or extract a member of a universal binary, = but you can't build a universal binary with binutils tools. That's something I'd like to add, bu= t it will require a change to ar. Tristan.