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


Nick Clifton <nickc@cambridge.redhat.com> writes:

> Hi Donn, Hi Egor,
> 
> > This patch should help.   I believe it was submitted over two years
> > ago, but never got applied,
> 
> Thanks very much.
> 
> > -    send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
> > -    verbose "cmp tmpdir/ld2 tmpdir/ld3"
> > -    catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
> > +    send_log "compare tmpdir/ld2 tmpdir/ld3\n"
> > +    verbose "compare tmpdir/ld2 tmpdir/ld3"
> > +    # Trim off the date
> > +    # Altho this works, a way to poke the date would be better;
> > +    # Removing the date stamp completely has met with objections from
> > +    # end users.
> > +    exec tail +140 tmpdir/ld2 >tmpdir/ld2tail
> > +    exec tail +140 tmpdir/ld3 >tmpdir/ld3tail
> > +    catch "exec cmp tmpdir/ld2tail tmpdir/ld3tail" exec_output
> > +    exec rm tmpdir/ld2tail tmpdir/ld3tail
> >      set exec_output [prune_warnings $exec_output]
> 
> I have applied this patch, with a slightly tweaked comment.  I hope
> that it will help Egor with his tests.

I don't like this patch, as it completely fails to check whether the
bytes at the start of the file are the same.  Those bytes are
important in pretty much any object file format, and any differences
in them matter.

This kind of hack should only be done for those targets for which it
is necessary.  It should not be done for all targets.  It would be
even better to write target specific check routines which understand
how to ignore timestamp differences.

Ian


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