On 8 June 2015 at 09:27, Liviu Ionescu <i...@livius.net> wrote: > >> On 08 Jun 2015, at 10:50, Peter Maydell <peter.mayd...@linaro.org> wrote: >> >> On 7 June 2015 at 17:03, Liviu Ionescu <i...@livius.net> wrote: >>> >>>> On 07 Jun 2015, at 13:46, Peter Maydell <peter.mayd...@linaro.org> wrote: >>>> ... Some ELF files intended for embedded use have >>>> a little self-initializing bit on the front that manually clears >>>> their own .bss section, but that's not part of the ELF spec, and >>>> QEMU will handle the other kind too. >>> >>> as I said, in the embedded world things are a bit different, there >>> is no ELF loader, or you can consider the debugger as an ELF loader >>> since it is reading the ELF file and programming the flash. >>> >>> but during this step it makes no sense to write/clear the RAM >> >> That depends on what the ELF file is. > > yes and no. > > in this peculiar case, the problem is the simplistic approach > in the QEMU ELF loader, that uses only the header defs, ignoring >the detailed definitions in the separate sections.
No. As I explained, this is correct. An ELF loader is *supposed* to load based on the segment definitions. Sections are only for linking. If you don't like the segment descriptions in your ELF file you should probably change your linker script. -- PMM