it does not, it is ok to close this issue.
because the order of linking matter. the order how you pass the object files into the linker through the command line or the link file. on almost every system, including modern, order of linking matter.
because the order of linking matter. on almost every system, including modern, order of linking matter.
the gbdk-2020 design is quite convenient, and proven flexibility and extensibility, when porting to the number of platforms (consoles and computers) _CODE is for the user code and the library code. _HOME is for the non-switchable code (trampolines, C support functions, ISR's, user non-switchable code), entry point and interrupt vectors, if applicable, is in the fixed _HEADER section (marked with absolute attribute). such design make sense, at least for the most of the 8-bit platforms.
the gbdk-2020 design is quite convenient, and proven flexibility and extensibility, when porting to the number of platforms (consoles and computers) _CODE is for the user code and the library code. _HOME is for the non-switchable code (trampolines, C support functions, ISR's, user non-switchable code), entry point and interrupt vectors, if applicable, is in the fixed section (marked with absolute attribute). such design make sense, at least for the most of the 8-bit platforms.
the gbdk-2020 design is quite convenient, and proven flexibility and extensibility, when porting to the number of platforms (consoles and computers) _CODE is for the user code and the library code. _HOME is for the non-switchable code (trampolines, C support functions, ISR's), entry point and interrupt vectors, if applicable, is in the fixed section (marked with absolute attribute). such design make sense, at least for the most of the 8-bit platforms.
COMPILER does not "move your code". NEVER. the only case when it assigns sections for the other than _CODE(_<N>)is when you explicitly mark your function as __nonbanked or use specific pragmas, which you did not. all other sections come from the LIBRARY, including crt0, and the order and location is completely controlled by the LINKER. sdld* linker family has its own quirks and design limitations. you should carefully read the linker manual before designing your own libraries and runtime, because...
reading the linker manual - that's all topic starter need to solve his "problem".