Dear List,
I'm setting up a chroot to run my webserver in; I need only a few simple
programs from /bin and /usr/bin (cat, head, date, nc, etc..);
I used to have a script that would analyze the output of "ldd <prog>"
and produce a list of all the libs needed to run the said programs;
after I upgraded from Debian.sarge to Debian.etch it stopped working; I
can see that both the output of ldd and the structure of /lib has
changed substantially!!!
so I guess I need to understand how to read the output of ldd!
please see if you can help me:
$ uname -a
Linux kellogs 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686 GNU/Linux
$ ldd --version
ldd (GNU libc) 2.3.6
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
$ ldd /bin/cat
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7eb0000)
/lib/ld-linux.so.2 (0xb7fe8000)
how do I read the output of ldd?
line #1 points to an empty name; why?
"locate linux-gate" returns nothing!!!
why such a deep dir structure in line #2?
I was *really* scared when I did:
$ find /lib -name libc.so.6 -exec ls -Ll {} \;
-rwxr-xr-x 1 root root 1147548 Jan 19 10:14 /lib/libc.so.6
-rw-r--r-- 1 root root 1241392 Jan 19 10:15 /lib/tls/i686/cmov/libc.so.6
-rw-r--r-- 1 root root 1245488 Jan 19 10:14 /lib/tls/libc.so.6
$
wow!!! 3 different versions of libc.so.6!!!
(I hope there was a *strong* reason for that)
line #3 has no pointer (=>)! why?
to put it simple: I need to know the list of libs from /lib and /usr/lib
that I have to mirror in /opt/www/lib and /opt/www/usr/lib in order to
/opt/www/bin/cat to run inside the chroot;
[]s and TIA,
PS: this post would fit better in linux.debian.usr but my messages to it
are being silently dropped! and I used to post to linux.debian.user
w/o problems! is linux.debian.user being moderated now?
--
Otavio Exel /<\oo/>\ oexel@economatica.com.br
|
|
0
|
|
|
|
Reply
|
oexel (5)
|
3/24/2008 10:38:37 PM |
|
In comp.os.linux.misc Otavio Exel <oexel@economatica.com.br>:
[..]
> $ ldd /bin/cat
> linux-gate.so.1 => (0xffffe000)
> libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7eb0000)
> /lib/ld-linux.so.2 (0xb7fe8000)
> how do I read the output of ldd?
> line #1 points to an empty name; why?
> "locate linux-gate" returns nothing!!!
Because it isn't there, it is not existing as file, but handled
by the kernel at a fixed memory position, iirc DSO (virtual). You
should be able to find it in /proc/self/maps if you look for
[vdso].
Good luck
[left the rest for others to answer]
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 101: Collapsed Backbone
|
|
0
|
|
|
|
Reply
|
USENET22 (5462)
|
3/25/2008 1:05:15 AM
|
|