This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: timestamp in coff header breaks ld testsuite
- To: binutils at sources dot redhat dot com
- Subject: Re: timestamp in coff header breaks ld testsuite
- From: Ian Lance Taylor <ian at airs dot com>
- Date: 09 Nov 2001 12:54:36 -0800
- References: <85609824000.20011109125217@logos-m.ru>
egor duda <deo@logos-m.ru> writes:
> pei-based targets write a timestamp to object file header and it
> breaks some of testcases in ld testsuite. _bfd_ecoff_write_object_contents
> contains a comment about always setting timestamp to 0, but backend
> overrides timestamp field later. is it how things are supposed to
> work? What is the best way to deal with it -- write a separate utility
> to zero timestamp in already created object, or pass some flag to
> backend that timestamp should be zeroed? i wonder if any target needs
> this field to hold actual build timestamp at all?
The timestamp issue is based on an old disagreement between John
Gilmore and Steve Chamberlain. John Gilmore felt strongly that
running the linker twice with the same input file should produce
exactly the same output file. Hence this comment in coffcode.h:
/*
We will NOT put a fucking timestamp in the header here. Every time you
put it back, I will come in and take it out again. I'm sorry. This
field does not belong here. We fill it with a 0 so it compares the
same but is not a reasonable time. -- gnu@cygnus.com
*/
Steve Chamberlain felt it was appropriate to follow the spec when the
spec called for a timestamp, so he made the PEI code stuff the
timestamp in anyhow.
I personally think that an object file format should not specify a
timestamp. It is redundant with the file modification time. Given
that object file formats do specify timestamps, I'm agnostic as to
whether BFD should set them.
Ian