can we include dosfs?

Chris Johns chrisj at rtems.org
Tue Jun 21 02:10:22 UTC 2016


On 21/06/2016 09:15, Ben Gras wrote:
> On Tue, Jun 21, 2016 at 12:50 AM, Chris Johns <chrisj at rtems.org> wrote:
>> On 21/06/2016 01:42, Ben Gras wrote:
>>>
>>> A question I have is how we should load ELF files. From some cursory
>>> searching it seems there is an ELF loader which only works on a TFS
>>> filesystem. Is that right? If so, I wonder which is less work - making
>>> a TFS filesystem from the host or adapting that code to also be usable
>>> on a FAT FS.
>>
>>
>> An ELF loader for any file system would be useful. If it could be a single
>> pass load that would be nice and if this is not possible maybe a load into
>> RAM then parse from there.
>
> Hi Chris,
>
> By any file system, do you mean an ELF loader for any FS whatsoever or
> a generic ELF loader that works with all FSes :-). I can give it a
> shot but the umon surgery might be heavy.
>

The simplest ELF loader for umon that can load from any umon supported 
file system.

It might be easier to load a file into RAM and then parse. The only 
complication is the ELF image loading to the location you have loaded 
the image to which means a relocation or something user driven like 
uboot. Typical ELF parsing requires you read the headers and the 
sections and then seek to the section offset and load them.

Does the ELF code here help 
https://github.com/freebsd/freebsd/tree/master/sys/boot/common ?

Chris



More information about the umon-devel mailing list