Date: Tue, 14 Nov 2006 21:18:04 GMT From: David Sanderson<dsanderson@panasas.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/105542: on amd64, ldd produces bogus output for i386 executables Message-ID: <200611142118.kAELI4wq088603@www.freebsd.org> Resent-Message-ID: <200611142120.kAELK2he003675@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 105542 >Category: misc >Synopsis: on amd64, ldd produces bogus output for i386 executables >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 14 21:20:02 GMT 2006 >Closed-Date: >Last-Modified: >Originator: David Sanderson >Release: FreeBSD 6.1 (amd64, i386) >Organization: Panasas >Environment: FreeBSD compute-6-29 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:15:57 UTC 2006 root@bloom.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP amd64 >Description: The problem seems to be that ldd isn't setting LD_32_* environment variables along with the LD_* environment variables that it already sets: : compute-6-29; ldd /usr/pan/bin/tclsh8.3 ldd: /usr/pan/bin/tclsh8.3: can't read program header ldd: /usr/pan/bin/tclsh8.3: not a dynamic executable : compute-6-29; ldd32 /usr/pan/bin/tclsh8.3 libtcl83.so => /usr/pan/lib/libtcl83.so (0x28077000) libm.so.4 => /usr/lib32/libm.so.4 (0x280fb000) libc.so.6 => /usr/lib32/libc.so.6 (0x28112000) : compute-6-29; cat $HOME/scripts/ldd32 #!/bin/sh #------- # This lets us see what's going on with loading 32-bit shared objects # on FreeBSD 6. #------- export LD_32_TRACE_LOADED_OBJECTS; LD_32_TRACE_LOADED_OBJECTS=1 exec "$@" >How-To-Repeat: Use ldd on a dynamically loaded i386 executable on an amd64 freebsd6 system. >Fix: The fix would presumably be to go through the ldd code and have it set LD_32_* in addition to LD_*, for each LD_* variable it currently sets. Some adjustments to how ldd examines the program header may also be necessary. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611142118.kAELI4wq088603>