I want to control precisely the order of areas.
I want to set the location of 2 areas, and then using ordering, define where the other areas are.
So I would define "_CODE" and "_DATA", and others will be ordered according to these.
Here _DATA is 0x0100, _INITIALIZED, BSEG, BSS, HEAP all come after it.
_CODE is 0x08000, _INITIALIZER, _GSINIT and _GSFINAL follow this.
In the examples I have seen, the area order is set in the crt0.s. I have my own one of these.
I also use linker scripts.
-k c:\program files (x86)\sdcc\lib\z80
I assemble the crt0.s seperately then each of the libraries and the final code.
I then link it seperately with this script.
But, the linker refuses to give me the exact order I want. It insists on setting some areas in a different place.
How can I control exactly the order of the areas?