Hi.

Aren“t i, j and k being optimised out, since nothing is made with them?

Merry christmas to all. And happy new year as well.
Bye,
Ricardo

----- Original Message -----
From: "Steve Underwood" <ste...@coppice.org>
To: <mspgcc-users@lists.sourceforge.net>
Sent: Tuesday, December 24, 2002 1:41 PM
Subject: [Mspgcc-users] Initialisation code


> I just noticed that RAM is not initialise properly at startup, when the
> default startup code is used. It tries looping between __data_start and
> _edata, but these are both pointing to the same location - the start of
> RAM. If I compile something like:
>
> #include <io.h>
>
> int i;
> int j;
> int k;
>
> int main(int argc, char *argv[])
> {
>      extern int __data_start;
>      extern int _edata;
>      extern int _etext;
>
>      i = __data_start;
>      j = _edata;
>      k = _etext;
>      return  0;
> }
>
>
> and look at the code (eg with objdump) the location of __data_start and
> _edata are both 0x200, although _edata should clearly be somewhere
> higher. I think this is not a new problem, but I am suprised I haven't
> noticed it before. I'm not clear if the intention is that _edata should
> point to the end of RAM or the end of used RAM. The related _etext
> symbol points to the end of the code, rather than the end of the code
space.
>
> I looked at the files in binutils/binutils-2.11/ld/, but I don't really
> understand the syntax that is used (and, yes, I'm too lazy to work it
> out right now).
>
> A happy Christmas to anyone that solves this...... Oh, lets be generous.
> A happy Christmas to everyone. :-)
>
> Regards,
> Steve
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
>



Reply via email to