Eigenstate: myrddin-dev mailing list

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

Re: Smaller binary size


On Fri, 1 Dec 2017 18:04:03 +0800
nml <arumakanil@xxxxxxxxx> wrote:

> Hi Ori,
> 
> For the init calls topic, I am experimenting a solution inspired by the
> Linux kernel module and U-Boot.
> They solve the problem by collecting the address of the init symbols into a
> dedicated section when linking.

It's an interesting approach, although it'll take care to ensure that we
don't lose a current guarantee with the way we generate things right now.

At the moment, if you have:

    use foo

    const __init__ = {
        foo.bar()
    }

it's guaranteed that __init__ in all dependencies is called before my
__init__.

-- 
Ori Bernstein <ori@xxxxxxxxxxxxxx>

References:
Re: Smaller binary sizenml <arumakanil@xxxxxxxxx>
Re: Smaller binary sizeAndrew Chambers <andrewchamberss@xxxxxxxxx>
Re: Smaller binary sizenml <arumakanil@xxxxxxxxx>
Re: Smaller binary sizeOri Bernstein <ori@xxxxxxxxxxxxxx>
Re: Smaller binary sizenml <arumakanil@xxxxxxxxx>