Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Oct 2008 03:23:08 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        "Alexander Sack" <pisymbol@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, freebsd-questions@freebsd.org
Subject:   Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries?
Message-ID:  <86d4hqwzur.fsf@ds4.des.no>
In-Reply-To: <86hc72x0nx.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Fri, 24 Oct 2008 03:05:38 %2B0200")
References:  <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Sm=C3=B8rgrav <des@des.no> writes:
> If you look at the rtld(1) man page, there are a number of environment
> variables you can set to debug the loader.  I'm not sure how helpful
> they are, though.

You can rebuild rtld(1) with debugging enabled:

% cd /usr/src/libexec/rtld-elf
% make clean
% make DEBUG_FLAGS=3D-DDEBUG
% make install
% echo $LD_LIBRARY_PATH=20
/home/des/lib:/opt/varnish/lib:/usr/local/lib
% LD_DEBUG=3D1 /usr/bin/true
/libexec/ld-elf.so.1 is initialized, base address =3D 0x800500000
RTLD dynamic =3D 0x8006305b0
RTLD pltgot  =3D 0x0
processing main program's program header
Filling in DT_DEBUG entry
lm_init("(null)")
loading LD_PRELOAD libraries
loading needed objects
 Searching for "libc.so.7"
  Trying "/home/des/lib/libc.so.7"
  Trying "/opt/varnish/lib/libc.so.7"
  Trying "/usr/local/lib/libc.so.7"
  Trying "/lib/libc.so.7"
loading "/lib/libc.so.7"
Ignoring d_tag 1879048185 =3D 0x6ffffff9
  0x80063b000 .. 0x80085efff: /lib/libc.so.7
checking for required versions
initializing initial thread local storage
relocating "/usr/bin/true"
relocating "/lib/libc.so.7"
doing copy relocations
initializing key program variables
"__progname": *0x5005e8 <-- 0x7fffffffebc1
"environ": *0x500878 <-- 0x7fffffffe9a8
initializing thread locks
calling init function for /lib/libc.so.7 at 0x800664da8
"__sysctl" in "libc.so.7" =3D=3D> 0x80071ae00 in "libc.so.7"
reloc_jmpslot: *0x800845c78 =3D 0x80071ae00
transferring control to program entry point =3D 0x400420
"atexit" in "true" =3D=3D> 0x8006fac3e in "libc.so.7"
reloc_jmpslot: *0x500868 =3D 0x8006fac3e
"exit" in "true" =3D=3D> 0x8006af118 in "libc.so.7"
reloc_jmpslot: *0x500860 =3D 0x8006af118
"__cxa_finalize" in "libc.so.7" =3D=3D> 0x8006fa940 in "libc.so.7"
reloc_jmpslot: *0x800846140 =3D 0x8006fa940
rtld_exit()
calling fini function for /lib/libc.so.7 at 0x80071ae60
"_exit" in "libc.so.7" =3D=3D> 0x8006cfff0 in "libc.so.7"
reloc_jmpslot: *0x8008471d8 =3D 0x8006cfff0

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86d4hqwzur.fsf>