Bug#298311: new ldd breaks initrd-tools on amd64
Harald Dunkel <harald.dunkel@t-online.de> writes:
> Goswin von Brederlow wrote:
>>
>> Remeber the gcc-3.4/4.0 archive is highly experimental and breaks all
>> over the place. This is just another of its bugs.
>>
>
> When I started using it, it wasn't experimental at all. It was
> the same as Unstable, but it used another compiler (gcc 3.4 instead
> of 3.3) to build Mozilla and a few other packages. So what went
> wrong?
It always was. It used gcc-3.4 for everything and now is using
gcc-4.0.
>
>>
>> old:
>> $ ldd /bin/sh
>>         linux-gate.so.1 =>  (0x00000000)
>>         libncurses.so.5 => /lib/libncurses.so.5 (0x55574000)
>>         libdl.so.2 => /lib/tls/libdl.so.2 (0x555b3000)
>>         libc.so.6 => /lib/tls/libc.so.6 (0x555b7000)
>>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x55555000)
>>
>
> new:
>
> % ldd /bin/sh
>          libncurses.so.5 => /lib/libncurses.so.5 (0x00002aaaaabc3000)
>          libdl.so.2 => /lib/libdl.so.2 (0x00002aaaaad1d000)
>          libc.so.6 => /lib/libc.so.6 (0x00002aaaaae20000)
>          /lib/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)
That is a 64bit sh. No linux-gate.so.1 there. You have to run ldd on a
32bit binary. If you have no chroot install ia32-libs and run 
% ldd /emul/ia32-linux/lib/libc-2.3.2.so
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x56555000)
        linux-gate.so.1 =>  (0x00000000)
> But maybe it would be a better solution to ask the glibc
> folks to provide a special flag for ldd to support a more
> machine readable output format, e.g.
>
> libncurses.so.5:/lib/libncurses.so.5:0x00002aaaaabc3000
> libdl.so.2:/lib/libdl.so.2:0x00002aaaaad1d000
> libc.so.6:/lib/libc.so.6:0x00002aaaaae20000
> :/lib/ld-linux-x86-64.so.2:0x00002aaaaaaab000
>
> This would make parsing the output much more efficient,
> e.g.
>
> 	for x in `ldd /bin/sh`; do
> 		IFS=:
> 		set $x
> 		echo $2
> 	done
> 	unset IFS
ldd /bin/sh | while IFS=: read LIB FILE ADDR; do echo $FILE; done
> Regards
>
> Harri
MfG
        Goswin
Reply to: