Re: Linux gcc compiler output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Crumrine, Ray" <Ray.Crumrine@xxxxxxxxxxxx> writes:

> I'm trying to find out where in the header of the resulting file that is
> created when gcc runs is the date / time of file creation and what format.
> Can anyone help? I'm assuming it's probably there in some binary format. Any
> help is appreciated.

I'm not sure what you are asking. gcc does not normally put a
    timestamp in its output.

You can put code like this:

char const* cp= "Date: " __DATE__;
char const* cp2= "Time: " __TIME__;

in your program, and on most systems you can run strings on the
resulting binary, and see something like this:

$ strings a.out | grep 'Date\|Time'
Date: May  4 2004
Time: 07:04:56


If the output is an archive, and you
    have gnu binutils, you can use objdump -a to see the dates the
    individual members of the archive were added.

That's all I know about.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux