Re: Different executables of the same source

2004-02-12 Thread Shankar Unni
Brian Ford wrote:

gcc doesn't create .o or .exe files.  as/ld do respectively :).
Of course. There *are* gcc ports that don't use binutils, I know - I've 
done gcc ports. But most "regular folks" think of "gcc" as a monolithic 
compiler suite.

Anyway, I'll probably report this on the binutils list if I find the 
time. It's purely cosmetic..

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Different executables of the same source

2004-02-11 Thread Brian Ford
On Wed, 11 Feb 2004, Shankar Unni wrote:

> Alex Vinokur wrote:
>
> > How can one get the creation time of object file foo.o?
> >
> Use "objdump -p".
>
> But it looks like gcc doesn't stuff a timestamp into the .o, but does
> into the .exe.
>
Just a simple correction.  gcc doesn't create .o or .exe files.  as/ld
do respectively :).

So, this would be an as "buglet", I guess.  Feel free to follow up in the
binutils mailing list if you feel the urge.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Different executables of the same source

2004-02-11 Thread Shankar Unni
Alex Vinokur wrote:

How can one get the creation time of object file foo.o?
Use "objdump -p".

But it looks like gcc doesn't stuff a timestamp into the .o, but does 
into the .exe.

Visual C++ puts a timestamp in both the .obj and .exe.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Different executables of the same source

2004-02-10 Thread Brian Dessent
Alex Vinokur wrote:

> How to compute the MD5-sums of executables?

"man md5sum"

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Different executables of the same source

2004-02-10 Thread Alex Vinokur

"Demmer, Thomas" wrote in message news:[EMAIL PROTECTED]

[snip]
> Due to this "feature" the MD5-sums
> of executables compiled on two different machines will hardly ever
> concide.
[snip]

How to compute the MD5-sums of executables?

--
   Alex Vinokur
 mailto:[EMAIL PROTECTED]
 http://mathforum.org/library/view/10978.html







--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Different executables of the same source

2004-02-10 Thread Alex Vinokur

"Shankar Unni" wrote in message news:[EMAIL PROTECTED]
> Demmer, Thomas wrote:
>
> > Because the PE header has a field that contains
> > the creation time. Due to this "feature" the MD5-sums
> > of executables compiled on two different machines will hardly ever
> > concide. I have no clue why this feature exists.
>
> Almost *all* object file formats (ELF, COFF/PE, ...) have such headers,
> to tell you when and where it was built.
>
>

How can one get the creation time of object file foo.o?


--
   Alex Vinokur
 mailto:[EMAIL PROTECTED]
 http://mathforum.org/library/view/10978.html





--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Different executables of the same source

2004-02-10 Thread Shankar Unni
Demmer, Thomas wrote:

Because the PE header has a field that contains
the creation time. Due to this "feature" the MD5-sums
of executables compiled on two different machines will hardly ever
concide. I have no clue why this feature exists.
Almost *all* object file formats (ELF, COFF/PE, ...) have such headers, 
to tell you when and where it was built.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Different executables of the same source

2004-02-10 Thread Brian Ford
On Tue, 10 Feb 2004, Alex Vinokur wrote:
> "Demmer, Thomas"  wrote in message
>
Please, no plain text email addresses in replies.  They are food
for spammers.  Thanks.

> >"Alex Vinokur" wrote:
> >>[...]
> >>$ gcc foo.c -o x1.exe
> >>
> >>$ gcc foo.c -o x2.exe
> >>
> >>$ cmp x1.exe x2.exe
> >>x1.exe x2.exe differ: char 137, line 2
> >>
> >>Why are x1.exe and x2.exe different?
> >>
> >Because the PE header has a field that contains
> >the creation time.
> >
> What does 'the PE header' mean?
>
The section header defined by Microsoft's "Portable Executable" extension
to the COFF (Common Object File Format) specification.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Different executables of the same source

2004-02-10 Thread Alex Vinokur

"Demmer, Thomas" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>"Alex Vinokur" wrote:
>[...]
>>$ gcc foo.c -o x1.exe
>>
>>$ gcc foo.c -o x2.exe
>>
>>$ cmp x1.exe x2.exe
>>x1.exe x2.exe differ: char 137, line 2
>>
>>Why are x1.exe and x2.exe different?

>Because the PE header has a field that contains
>the creation time.
[snip]

What does 'the PE header' mean?

--
   Alex Vinokur
 mailto:[EMAIL PROTECTED]
 http://mathforum.org/library/view/10978.html






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Different executables of the same source

2004-02-10 Thread Demmer, Thomas
"Alex Vinokur" wrote:
[...]
>$ gcc foo.c -o x1.exe
>
>$ gcc foo.c -o x2.exe
>
>$ cmp x1.exe x2.exe
>x1.exe x2.exe differ: char 137, line 2
>
>Why are x1.exe and x2.exe different?

Because the PE header has a field that contains
the creation time. Due to this "feature" the MD5-sums
of executables compiled on two different machines will hardly ever
concide. I have no clue why this feature exists.

Ciao
Tom


Best regards / Mit freundlichen GrĂ¼ssen,


Thomas Demmer
Kraft Foods R&D Inc.
Chocolate WW Process Development

Tel.: +49 (0)89 62738-6302
Fax: +49 (0)89 62738-86302


Thought of the day
By doing just a little every day, you can gradually let the task
completely overwhelm you.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Different executables of the same source

2004-02-10 Thread Alex Vinokur
$ uname -sr
CYGWIN_NT-5.0 1.5.5(0.94/3/2)

$ gcc --version
gcc (GCC) 3.3.1 (cygming special)
[snip]

$ cmp -v
cmp (GNU diffutils) 2.8.4
[snip]


--- C program (foo.c) ---
int main()
{
  return 0;
}
-

$ gcc foo.c -o x1.exe

$ gcc foo.c -o x2.exe

$ cmp x1.exe x2.exe
x1.exe x2.exe differ: char 137, line 2

Why are x1.exe and x2.exe different?


--
   Alex Vinokur
 mailto:[EMAIL PROTECTED]
 http://mathforum.org/library/view/10978.html







--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/