On 06/25/2018 11:01 PM, Michael D. Setzer II wrote:
> I went ahead and built a static version of busybox, but it increase the size 
> by 
> about 900K.
> 
> -rwxr-xr-x. 1 root root 1280672 Jun 26 08:46 busybox
> -rwxr-xr-x. 1 root root   383700 Jun 26 08:12 busybox.save

It's expected that static builds are slightly bigger, they incorporate
an extra copy of libc as the price you pay for being able to still work
on systems that don't have libc at all.

It's still quite small...

Note, that if you wish to decrease the size there's a lot you could do
to configure it.

$ ls -l /bin/busybox
-rwxr-xr-x 1 root root 1025792 May 27 12:17 /bin/busybox*

This is built with musl instead of glibc, and with most optional
features enabled. You could get it a lot smaller, but... that depends on
which features you need.

> Seems there should be a way to find what libraries might be used if ldd 
> doesn't list them?? Have other programs that also use libc.so.6, so it needs 
> to be included for them? There were about 60 total libraries that were not 
> listed by ldd (Many are the various link files to the library).

If ldd doesn't list them, it is because dlopen() is being used.

If dlopen() is being used, either you used GNU libc, which plays mind
games with you by using dlopen() when you don't expect, or, your own
code uses dlopen().

With no protection.

dlopen() is more commonly used in things like vim, which can dlopen()
python, perl, ruby, tcl, lua etc. to provide scripting support, but if
those libraries aren't there then vim will just keep working but with
those features disabled.

-- 
Eli Schwartz
Bug Wrangler and Trusted User

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to