[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] New object format for grub2

From: Bean
Subject: Re: [RFC] New object format for grub2
Date: Wed, 8 Jul 2009 23:37:10 +0800

On Wed, Jul 8, 2009 at 10:27 PM, Marco Gerards<address@hidden> wrote:
> Hi,
> Bean <address@hidden> writes:
>> Why another format ? Here are some reason:
>> The current object format is ELF. Most unix based os use ELF as native
>> object format, but there are minor difference, and gcc may add extra
>> segment which is of no use for grub. Mingw/cygwin uses PE, and we need
>> to convert it to ELF. Platform like OSX also requires special
>> treatment. All these make the build system complicated, so we might
>> just use an unified format specific to grub.
>> The ELF format is designed to be compatible with many system, it's
>> neither compact nor easy to parse. If we invent a new format, we
>> should make it simple.
> There is another problem with this: the maintainance burden.  People
> know ELF, we have ELF and people will know ELF in the future.
> Furthermore, as far as I am concerned, GNU/Linux is our main
> platform.  I do not mind supporting windows or so and we can support
> it in a sane way, but changing our binary formats for it is one step
> too far for me...


An important issue to consider is the size of kernel. As of now,
core.img is approaching the upper limit. And the size of ELF header is
quite significant. For example, the size of hello.mod is 1132, but the
actually code is only 120 !  Also, the size of dynamic loader is quite
big, about 3K, which is the fourth largest part in the kernel, right
after misc, startup and symlist.

And with customized format, it's easier to implement features like
library, which can help to reduce kernel size further.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]