Bug#209145: libc6: ldd output ugliness
On Tue, Sep 09, 2003 at 03:50:11PM +0900, GOTO Masanori wrote:
> At Mon, 08 Sep 2003 03:22:19 +0200,
> Juergen Kreileder wrote:
> >
> > Package: libc6
> > Version: 2.3.2-5
> > Severity: minor
> >
> > ldd does too much indentation currently, here are a few examples:
> >
> > ,----
> > | fry:/home/jk# ldd /lib/libc.so.6
> > | /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> > | fry:/home/jk#
> > `----
> >
> > ,----
> > | fry:/home/jk# ldd /lib/libpthread.so.0
> > | libc.so.6 => /lib/libc.so.6 (0x40062000)
> > | /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> > | fry:/home/jk#
> > `----
> >
> > ,----
> > | fry:/home/jk# ldd /bin/ls
> > | librt.so.1 => /lib/librt.so.1 (0x40026000)
> > | libacl.so.1 => /lib/libacl.so.1 (0x40038000)
> > | libc.so.6 => /lib/libc.so.6 (0x4003f000)
> > | libpthread.so.0 => /lib/libpthread.so.0 (0x40165000)
> > | /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> > | libattr.so.1 => /lib/libattr.so.1 (0x401b5000)
> > | fry:/home/jk#
> > `----
> >
> > Seen with various shells and TERMs.
>
> This is because first writev() shows only one character "\t". I guess
> this linux-gate.so.1 is appeared in 2.6 kernel with sysenter ready
> processor (Pentium4). I still don't know why this writev() is stopped
> to output, and where is it resolved.
>
> writev(1, [{"\t", 1}, {"linux-gate.so.1", 15}, {" => ", 4}, {"", 0}, {" (0x", 4}, {"00000000", 8}, {")\n", 2}], 7 ) = 1
> writev(1, [{"\t", 1}, {"librt.so.1", 10}, {" => ", 4}, {"/lib/librt.so.1", 15}, {" (0x", 4}, {"4001a000", 8}, {")\n", 2}], 7) = 44
Aha, see the {"", 0}? The kernel is treating that as a terminator.
glibc is printing a NULL in the middle of the arguments, in place of
the pathname.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
Reply to: