Bug#295412: initrd-tools: Fails to ignore 32bit emulation layer on ldd calls
On Wed, Feb 23, 2005 at 05:58:59AM +0100, Harald Dunkel wrote: Joshua Kwan wrote: Harald Dunkel wrote: Assuming that valid shared library paths start with '/' I would suggest to apply this patch to mkinitrd: Hmm, maybe not if LD_LIBRARY_PATH is being used. Beware. ??? I am not sure whether searching dynamic libraries relative to either the $CWD or to the bin directory is a good idea, especially for system tools. Agreed. Your proposed patch is certainly much cleaner than grepping linux-gate away. If I understand the linux-gate concept correctly, its an area of memory mapped into application process space not based on a segment in an object file, but based on a prototype the kernel provides. What mkinitrd should recognise is that there's no file listed that the shared library resolves to. A pattern such as / = \(0x/ should recognise these cases and still maintain current behaviour with regard to LD_LIBRARY_PATH. Incidentally, there may be another ldd related bug waiting to happen. Currently, mkinitrd accepts ldd 2.3.2 output that look like this: /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0xb7fea000) But in ldd 2.3.3, that output format will change to this (tested in Fedora FC3): /lib/ld-linux.so.2 (0x0056f000) Perhaps that pattern should also be matched. Regards, Erik -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#295412: initrd-tools: Fails to ignore 32bit emulation layer on ldd calls
On Thu, Feb 17, 2005 at 02:07:33AM -0800, Joshua Kwan wrote: Harald Dunkel wrote: Assuming that valid shared library paths start with '/' I would suggest to apply this patch to mkinitrd: Hmm, maybe not if LD_LIBRARY_PATH is being used. Beware. What about elimiating lines that contain (0x) ? -- Horms -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#295412: initrd-tools: Fails to ignore 32bit emulation layer on ldd calls
Joshua Kwan wrote: Harald Dunkel wrote: Assuming that valid shared library paths start with '/' I would suggest to apply this patch to mkinitrd: Hmm, maybe not if LD_LIBRARY_PATH is being used. Beware. ??? I am not sure whether searching dynamic libraries relative to either the $CWD or to the bin directory is a good idea, especially for system tools. Regards Harri signature.asc Description: OpenPGP digital signature
Bug#295412: initrd-tools: Fails to ignore 32bit emulation layer on ldd calls
Harald Dunkel wrote: Assuming that valid shared library paths start with '/' I would suggest to apply this patch to mkinitrd: Hmm, maybe not if LD_LIBRARY_PATH is being used. Beware. -- Joshua Kwan signature.asc Description: OpenPGP digital signature
Bug#295412: initrd-tools: Fails to ignore 32bit emulation layer on ldd calls
Package: initrd-tools Version: 0.1.77 Severity: important Tags: patch Hi, when running a 64bit kernel with 32bit userspace on i386 the ldd output includes the 32bit emulation layer as linux-gate.so library without any realy file and mapped to 0x. Since mkinitrd tries to cpio all {$3} from the ldd output it fails with (0x) being missing. -- [EMAIL PROTECTED]:~% sudo chroot /var/chroot ldd /bin/sh linux-gate.so.1 = (0x) libncurses.so.5 = /lib/libncurses.so.5 (0x55572000) libdl.so.2 = /lib/tls/libdl.so.2 (0x555b1000) libc.so.6 = /lib/tls/libc.so.6 (0x555b5000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x5000) -- The attached patch filters out the extraneous entry from the ldd output. MfG Goswin -- System Information: Debian Release: 3.1 Architecture: amd64 (x86_64) Kernel: Linux 2.6.8-frosties-1 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages initrd-tools depends on: ii coreutils [fileutils] 5.2.1-2The GNU core utilities ii cpio 2.5-1.2GNU cpio -- a program to manage ar ii cramfsprogs 1.1-6 Tools for CramFs (Compressed ROM F ii dash 0.5.2-1The Debian Almquist Shell ii util-linux2.12p-2Miscellaneous system utilities -- no debconf information --- mkinitrd.orig 2005-02-15 17:52:39.356880824 +0100 +++ mkinitrd2005-02-15 17:53:34.649475072 +0100 @@ -841,7 +841,7 @@ return $err ;; esac - echo $x + echo $x | grep -v linux-gate.so } add_modules_most() {
Bug#295412: initrd-tools: Fails to ignore 32bit emulation layer on ldd calls
This seems to be a dup of #279382. Assuming that valid shared library paths start with '/' I would suggest to apply this patch to mkinitrd: @@ -1181,7 +1198,7 @@ add_command $i done exec 3- -tmp2 sed 's/.*=[[:blank:]]*\([^[:blank:]]*\).*/\1/' +tmp2 awk '/.*=[[:blank:]]*\/[^[:blank:]]*.*/ { print $3 };' echo /dev/console echo /dev/null Regards Harri signature.asc Description: OpenPGP digital signature