This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linux gcc compiler output


"Crumrine, Ray" <Ray.Crumrine@Glenayre.com> 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]