From owner-freebsd-questions@FreeBSD.ORG Thu Nov 29 21:01:00 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2EA4C3F for ; Thu, 29 Nov 2012 21:01:00 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 5DBB98FC08 for ; Thu, 29 Nov 2012 21:00:59 +0000 (UTC) Received: from r56.edvax.de (port-92-195-51-39.dynamic.qsc.de [92.195.51.39]) by mx02.qsc.de (Postfix) with ESMTP id 1A8C32490F; Thu, 29 Nov 2012 22:00:52 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id qATL0s1E002511; Thu, 29 Nov 2012 22:00:54 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 29 Nov 2012 22:00:54 +0100 From: Polytropon To: freebsd@dreamchaser.org Subject: Re: ld; extracting from libraries; and related questions Message-Id: <20121129220054.74d2ce8c.freebsd@edvax.de> In-Reply-To: <50B7CB6A.2060606@dreamchaser.org> References: <50B7CB6A.2060606@dreamchaser.org> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2012 21:01:00 -0000 On Thu, 29 Nov 2012 13:54:02 -0700, Gary Aitken wrote: > Is it possible to extract a .o from a lib.a or lib.so, so I can compare > it to the .o built by the make? If I remember correctly (which requires a travel into the distant past), I think "ar" - the library archiver - is the tool you need. Check "man ar", the EXAMPLES section: To verbosely list the contents of archive ex.a, use: ar -tv ex.a So by using -x instead of -t, the members should be extracted. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...