Howdy!
I did a similar thing a while back, albeit just with a fixed integer value.

Here's the discussion with links to the relevant files
[1<http://www.mail-archive.com/mspgcc-users@lists.sourceforge.net/msg10610.html>
].

If you can come up with a more elegant method, let me know!


Thanks,
Doug

[1]
http://www.mail-archive.com/mspgcc-users@lists.sourceforge.net/msg10610.html


On Mon, Jan 28, 2013 at 5:11 PM, Robert Henig <rhe...@redwoodsys.com> wrote:

> I am trying to force a string into a fixed location using a linker script.
> The script contains:
>
>     .text :
>     {
>         swVer = .;
>         . += 8;
>     }
>
> The code contains:
>
> const char swVer[] = "01.0904\0";
>
> After compiling the .map file shows that eight bytes are reserved at
> 0xc000 and a symbol named swVer at that location. As expected .init0 is at
> 0xc008. However the linker does not initialize the memory with the version
> string. It is initialized to zeros. Anyone have any idea how to make this
> work?
>
> Thanks,
> Bob.
>
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to