From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [fyi] lddtree magic
Date: Tue, 9 Apr 2013 15:31:05 -0400 [thread overview]
Message-ID: <201304091531.06078.vapier@gentoo.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]
i doubt few people have noticed, but i've rewritten lddtree recently in
python. i did for speed, for fun, and to add a lot more functionality that
would have driven the bash code base to new perverse levels.
i've randomly stumbled across places in our code base (beyond ebuilds) where
the new python version would be useful. rather than try and ferret out those
myself, i'll just announce here and people can sort it out.
if you guys think this can satisfy most of your needs but there's like a small
edge case that isn't quite handled, let me know. i can always add another
option :).
specifically, lddtree (both the shell & python variants) support a --list:
$ lddtree -l /bin/bash
/bin/bash
/lib64/ld-linux-x86-64.so.2
/lib64/libreadline.so.6
/lib64/libhistory.so.6
/lib64/libncurses.so.5
/lib64/libdl.so.2
/lib64/libc.so.6
this way you don't have to resort to grep/awk/sed on the output to try and get
the names out of `lddtree` (or heaven forbid, `ldd`).
it also supports --root just like you'd expect:
$ lddtree -l /bin/bash --root /mnt/space/distros/x86
/mnt/space/distros/x86/bin/bash
/mnt/space/distros/x86/lib/ld-linux.so.2
/mnt/space/distros/x86/lib/libreadline.so.6
/mnt/space/distros/x86/lib/libncurses.so.5
/mnt/space/distros/x86/lib/libdl.so.2
/mnt/space/distros/x86/lib/libc.so.6
but things get even crazier with the new --copy-to-tree option (python version
only). this is useful for scenarios like kernel initramfs where you want to
copy over one or two ELFs and their dependencies w/out resorting to statically
linking them. check out the --help text for more details.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2013-04-09 19:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 19:31 Mike Frysinger [this message]
2013-04-09 20:30 ` [gentoo-dev] [fyi] lddtree magic Diego Elio Pettenò
2013-04-10 3:10 ` Mike Frysinger
2013-04-10 10:04 ` Fabio Erculiani
2013-04-10 16:33 ` Mike Frysinger
2013-04-10 16:42 ` Fabio Erculiani
2013-04-10 17:32 ` Mike Frysinger
2013-04-10 17:40 ` Fabio Erculiani
2013-04-10 17:56 ` Mike Frysinger
2013-04-09 20:41 ` Samuli Suominen
2013-04-09 20:45 ` Samuli Suominen
2013-04-10 2:30 ` Mike Frysinger
2013-04-09 22:22 ` Samuli Suominen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201304091531.06078.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox