bruce.dubbs at gmail.com
Tue Feb 21 20:28:40 PST 2012
Jeremy Huntwork wrote:
> On 2/21/12 8:51 PM, Bruce Dubbs wrote:
>> Very interesting. I took your scripts and hacked them a bit. I set it up
> Oh, one other thing that I was going to do at some point but also hadn't
> gotten around to yet was to pull in the required dynamic libs, well,
> dynamically. Perhaps parse output from ldd on the binaries and bring in
> the required libs instead of hard-coding them in the script.
$ cat list-libs.sh
binfiles="sh cat cp dd killall ls lsmod mkdir mknod mount "
binfiles="$binfiles umount sed sleep ln rm uname"
sbinfiles="udevadm udevd modprobe blkid switch_root mdadm"
for f in $binfiles; do
ldd /bin/$f | sed "s/\t//" | cut -d" " -f1 >> $unsorted
for f in $sbinfiles; do
ldd /sbin/$f | sed "s/\t//" | cut -d" " -f1 >> $unsorted
sort $unsorted | uniq | while read lib ; do
if [ "$lib" == "linux-vdso.so.1" ] ||
[ "$lib" == "linux-gate.so.1" ]; then
$ sh list-libs.sh
More information about the blfs-dev