This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Statically linked binary way way too big


Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> writes:

> Say that again? It's ok for this program to occupy 400k?

Why is 400k any different than 40k, 4M? It so happens that 400k appear
much to you at the moment. Your views will change.

> This last sentence makes me think that you imply ld does _not_
> discard unused functions from individual object modules.

No. They are all used.

> So it may easily link in module a with functions a1() and a2()
> because program needs a1(), and then link in module b,
> because a2() needs something from it. Despite the fact that a2()
> never called. Can ld do that?

It can, if the module has been compiled with
-ffunction-sections. However, for glibc, this is not an issue, because
no module contains more than one function.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]