This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with static and global data initialization
- From: Erik Christiansen <erik at dd dot nec dot com dot au>
- To: "Venkata, Bulusu (IE10)" <Venkata dot Bulusu at honeywell dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 22 May 2003 18:48:30 +1000
- Subject: Re: Problem with static and global data initialization
- References: <CDDB93E84A8DD411B01900D0B7827840107802C6@IE10-SAHARA>
On Thu, May 22, 2003 at 12:21:21PM +0530, Venkata, Bulusu (IE10) wrote:
> I've even tried to have my own ld
> linker script which defines the different sections and also wrote the
> initialization code in the file ctr0.o(i.e. making the ".bss" data all
> zeroes and copying all ".data" section info into RAM).
You're on the right track. Once you have provided and linked crt0.o,
you'll need to ensure that it is called. Have you provided the label
_start for the standard startup to call? I'm just going on the
following in the GCC Manual:
>>>
-nostartfiles
Do not use the standard system startup files when linking. (e.g. crt0.o, with
_start) The standard system libraries are used normally, unless -nostdlib or
-nodefaultlibs is used.
<<<
There has to be better documentation somewhere, but I gave up
googling before finding it.
Regards,
Erik