ld; extracting from libraries; and related questions

Polytropon freebsd at edvax.de
Thu Nov 29 21:01:00 UTC 2012


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, ...


More information about the freebsd-questions mailing list