On 06/26/2018 07:37 AM, Walter Harms wrote:
> there is no static version of gnu-libc.

There is absolutely a libc.a provided by GNU libc, and you can
statically link it on account of it's a static library.

I'm looking at it right now, along with the binaries which are,
successfully, statically linked to it.

> But i agree there is other to really know what is needed.
> Dynamic libraries by there very name are dynamic and may link
> other libraies in without notice, i doubt ldd will be clever enought
> to see this.

This has absolutely nothing to do with dynamic vs. static libs.

Static libraries are part of the binary, and dynamic libraries are *very
clearly* marked as required, as ldd, readelf, objdump, or literally
anything else which checks ELF headers can attest.

dlopen() is a *third* way of "linking" a library, and any or all three
methods can be used in the same ELF file.

> In the give case ldd may be ok, but it is clearly not fool-proof and
> a runtime test is always required.

ldd is never okay, because it cannot detect dlopen().

Nothing can, except for running the binary and tracing the calls it makes.

-- 
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