Wind River Support Network

HomeDefectsLIN5-5512
Fixed

LIN5-5512 : ldd not working in multilib build

Created: Sep 16, 2013    Updated: Dec 19, 2017
Resolved Date: Sep 29, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.8
Severity: Severe
Applicable for: Wind River Linux 5
Component/s: Kernel

Description

In an x86-64 project with multilib enabled to include 32-bit packages, ldd fails to list libraries used by 32-bit binaries but works for 64-bit binaries.

Steps to Reproduce

$ configure --enable-board=qemux86-64 \
      --enable-rootfs=glibc_cgl --enable-kernel=cgl \
      --enable-jobs=4 --enable-parallel-pkgbuilds=4 \
      --enable-rm-work=yes --enable-rm-oldimgs=yes

Edit layers/local/conf/layer.conf to add the following at the end of the file:

--8<--
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
USE_LDCONFIG = "1"

IMAGE_INSTALL_append += "lib32-file \
                         lib32-which \
                         lib32-net-tools"
--8<--

$ make
$ make start-target

Log in and note the following behaviour.

root@qemu0:~# file /bin/bash
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.34, stripped

root@qemu0:~# ldd /bin/bash
        linux-vdso.so.1 (0x0000026fdd685000)
        libtinfo.so.5 => /lib64/libtinfo.so.5 (0x0000026fdd240000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000026fdd03c000)
        libc.so.6 => /lib64/libc.so.6 (0x0000026fdcc97000)
        /lib64/ld-linux-x86-64.so.2 (0x0000026fdd467000)

root@qemu0:~# file /usr/bin/which
/usr/bin/which: symbolic link to `which.which'

root@qemu0:~# file /usr/bin/which.which 
/usr/bin/which.which: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.34, stripped

root@qemu0:~# ldd /usr/bin/which.which 
root@qemu0:~#

The last line should have displayed the list of shared libs used as per the 64-bit example.

Note that /usr/bin/which does work as expected.

Other Downloads


Live chat
Online