Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Nov 2012 22:00:54 +0100
From:      Polytropon <freebsd@edvax.de>
To:        freebsd@dreamchaser.org
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.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>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20121129220054.74d2ce8c.freebsd>