[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] ELF loader?
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] ELF loader? |
Date: |
Mon, 8 Jun 2015 10:03:30 +0100 |
On 8 June 2015 at 09:27, Liviu Ionescu <address@hidden> wrote:
>
>> On 08 Jun 2015, at 10:50, Peter Maydell <address@hidden> wrote:
>>
>> On 7 June 2015 at 17:03, Liviu Ionescu <address@hidden> wrote:
>>>
>>>> On 07 Jun 2015, at 13:46, Peter Maydell <address@hidden> 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