|
From: Atirut W. <ati...@gm...> - 2025-01-29 10:08:47
|
> Typical SDCC targets are small systems with RAM and ROM/Flash, and SDCC > needs to take care of initializing data on startup. This can easily be done with `> RAM AT > ROM` using Binutils and doing a simple whole-section memcpy. It also simplifies a lot of things by using the same convention and not having a different symbol name for the initialized data. It would be nice to have as an option. On Wed, 29 Jan 2025, 16:28 Philipp Klaus Krause, <pk...@sp...> wrote: > Am 29.01.25 um 08:33 schrieb Atirut Wattanamongkol: > > Hi all. I've been trying to figure out how to make SDCC put > > initialized data in the data section instead of in `.initializer` and > > such, but no luck. > > > > My goal is to make SDCC work well with Binutils with minimal custom > > linker script work, and putting initialized data in the data section > > is part of this. Problem is, I can't seem to figure out how to force > > SDCC to do that. All my hacks made to the compiler only seem to move > > it somewhere else other than the data section. Should I look at > > directly implementing native ELF output instead? > > Which port are you working on? I don't see how ELF would make a > difference here (but if you want to see for yourself, have a look at one > of the ports that do support ELF output (hc08, s08, stm8)). > Typical SDCC targets are small systems with RAM and ROM/Flash, and SDCC > needs to take care of initializing data on startup. > > Philipp > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-devel > |