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: Problem with static and global data initialization


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]