svn commit: r304321 - in head/sys: boot/efi/boot1 boot/efi/loader boot/i386/boot2 boot/i386/gptboot boot/i386/gptzfsboot boot/i386/zfsboot boot/userboot/ficl boot/userboot/userboot boot/userboot/zf...

Toomas Soome tsoome at me.com
Mon Aug 22 14:56:24 UTC 2016


> On 22. aug 2016, at 17:19, Warner Losh <imp at bsdimp.com> wrote:
> 
> On Mon, Aug 22, 2016 at 3:44 AM, Toomas Soome <tsoome at me.com> wrote:
>> I do suspect the size difference there is partially due to ficl, in illumos (ficl 4):
>> 
>> -rw-r--r--   1 tsoome   staff     132508 aug 22 09:18 libficl.a
>> 
>> and freebsd (ficl 3):
>> 
>> -rw-r--r--  1 root  wheel  213748 Aug 19 01:57 libficl.a
>> 
>> so, there definitely is some space…
> 
> Same compiler? Clang bloats the boot code rather substantially, even after
> all the flags to tell it to generate smaller code are used. gcc 4.2.x
> built stuff
> was substantially smaller.
> 
> There's a 520kb limit enforced in the boot1 for similar reasons. Looks like
> the combination of options makes us use just enough extra memory to
> sink the battleship...
> 
> Warner
> 


Actually I only now realized I was comparing apples with oranges… I forgot the fbsd builds 32bit version in ficl32, this one is 64bit. and yes the 32bit version is not that big at all:D

Also, after done some digging, I have found few instances of duplicated code (we can share sha2 with geli and so if sha512 is already needed, it will become another “free lunch”). Also, unless I’m mistaken, for some reason the bzip *compression* is brought in - correct me if I’m wrong, but afaik only decompression is needed…

So before going after “useless features”, there are some “hidden” resources to remove extra fat.

rgds,
toomas


More information about the svn-src-head mailing list