This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: timestamp in coff header breaks ld testsuite


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]