[Top][All Lists]

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

Re: [avr-gcc-list] Adding date/version information to project??

From: Erik Christiansen
Subject: Re: [avr-gcc-list] Adding date/version information to project??
Date: Tue, 29 Nov 2005 16:19:54 +1100
User-agent: Mutt/1.5.6+20040722i

On Tue, Nov 29, 2005 at 03:35:19PM +1100, Russell Shaw wrote:
> In the makefile rule that calls the linker, a shell command could get
> the current date and then edit the resulting binary to replace a special
> marker string with the current date. There might be a way to edit the
> linker script to edit a string before the linker is run too.

The linker command language supports insertion of byte|short|long|quad
values, defined by a linker expression. AFAIK, section data expressions
don't support strings.

Your makefile rule alternative seems to provide the greatest scope. A
few lines of awk could maybe spit out a source file with a literal
string that is explicitly compiled in the same rule. This would then
pop up in .rodata. (Once the .o file is in the link list in the
makefile. ;-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]