Date: Tue, 5 Oct 2010 15:59:06 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Erik Cederstrand <erik@cederstrand.dk> Cc: FreeBSD Hackers <hackers@FreeBSD.org> Subject: Re: Timestamps in static libraries Message-ID: <20101005135906.GA3430@owl.midgard.homeip.net> In-Reply-To: <52C32EA5-A380-4237-A27C-9E2DF2D4E022@cederstrand.dk> References: <52C32EA5-A380-4237-A27C-9E2DF2D4E022@cederstrand.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 05, 2010 at 03:28:36PM +0200, Erik Cederstrand wrote: > Hello hackers, > > I got reminded of a problem I had a couple of years back compressing > FreeBSD jails. I was using bsdiff for the compression and found out > that md5 sums of static libraries (.a files) in /usr/lib and > /usr/local/lib didn't match between jails, even though the source > code used to create the jails hadn't changed. One of my goals is to > detect which files in a distribution change between two commits. > > It turns out that timestamps are stored in the library: Yes, they are. That is because the file format used for static libraries include a timestamp for each object file stored in the archive. You can use 'ar -tv /PATH/TO/LIBRARY/libfoo.a' to get a list of the objects stored in the archive and the corresponding timestamps. See the ar(5) manpage for a description of the file format, and the ar(1) manpage for information on how to manage such files. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101005135906.GA3430>