On 12.05.2013 17:54, Claude Sylvain wrote:
> 
> On 12/05/13 11:31 AM, Philipp Klaus Krause wrote:
> 
>  >
>  > On 12.05.2013 17:01, Claude Sylvain wrote:
>  >
>  >>
>  >> - I use SDCC on Cygwin 1.7.x
>  >> - I use SDCC to built Z80 programs.
>  >>
>  >> - I have successfully built SDCC 3.3.0 RC2 from source on Cygwin.
>  >>
>  >> - However, when building a Z80 program, I noticed the following
>  >>     problem:
>  >>
>  >>   - SDCC put "s__INITIALIZER" section (that hold some code)
>  >>     in the "_DATA" section (RAM located @ 0x8000
>  >>     for the target I use).
>  >>
>  >> - I think this is a bug, because sections that hold code
>  >>     must be put in the "_CODE" section. Not in the
>  >>     "_DATA" section.
>  >>
>  >> - This bug was not there in SDCC 3.2.0.
>  >>     Also, in SDCC 3.2.0, there is no "s__INITIALIZER" section.
>  >>
>  >>
>  >>   From a SDCC user.
>  >>
>  >> Claude
>  >
>  > Do you use a custom crt0.rel?
>  >
> 
> - Yes, I use a custom "crt0".
> 
> - Do I have to update my custom "crt0", using some new
>    "ctr0" template found in SDCC ?
> 


Yes. The INITIALIZER / INITIALIZED mechanism is the new (sdcc 3.3.0) way
to initialize global variables. It is much faster and smaller than what
we did before. However the crt0 needs to do the copy from INITIALIZER to
INITIALIZED.

In sdcc, an example crt0 can be found at device/lib/z80/crt0.s

Philipp

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to