Disabling prelink in software builds

James Cameron quozl at laptop.org
Tue May 17 19:41:11 EDT 2011


Why not remove or normalise the timestamp in the prelink output?

I made a local version of prelink that avoided the use of time(2) in
setting the timestamp, and then compared the result against the system
version or prelink:

# prelink -u /tmp/libxml2.so 
# prelink /tmp/libxml2.so 
# md5sum /tmp/libxml2.so
f2ca3c0a897d1140e02e725a294e7cbb  /tmp/libxml2.so
# prelink -u /tmp/libxml2.so 
# prelink /tmp/libxml2.so 
# md5sum /tmp/libxml2.so
b98f4d68d312711562f801be05f30c95  /tmp/libxml2.so
# /tmp/prelink-0.0.20090925/src/prelink -u /tmp/libxml2.so
# /tmp/prelink-0.0.20090925/src/prelink /tmp/libxml2.so
# md5sum /tmp/libxml2.so
b356653156f963c1c5561f4025a53026  /tmp/libxml2.so
# /tmp/prelink-0.0.20090925/src/prelink -u /tmp/libxml2.so
# /tmp/prelink-0.0.20090925/src/prelink /tmp/libxml2.so
# md5sum /tmp/libxml2.so
b356653156f963c1c5561f4025a53026  /tmp/libxml2.so
# 

The md5sum no longer changes.  Therefore the md5sum changes you observe
are due to the system time when prelink is run.

In place of a zero time_t, the OLPC_EPOCH may be more suitable.

I did not investigate adjusting the output file directly, but it should
be possible.

The change I made to prelink is attached as a patch.

-- 
James Cameron
http://quozl.linux.org.au/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prelink-zero-timestamp.patch
Type: text/x-diff
Size: 357 bytes
Desc: not available
URL: <http://lists.laptop.org/pipermail/devel/attachments/20110518/714a7db2/attachment.patch>


More information about the Devel mailing list