RUNPATH and $ORIGIN

Peter S. Mazinger ps.m at gmx.net
Thu Feb 23 17:00:12 UTC 2006


On Thu, 23 Feb 2006, Peter S. Mazinger wrote:

> > uhh? Does ldso try to load the same lib again? 
> > Can you post a trace with LD_DEBUG=1?
> 
> LD_DEBUG=1 galeon
> 

another curiousity RPATH not checked...
readelf -d /usr/bin/galeon

Dynamic section at offset 0x15b460 contains 81 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libgtkembedmoz.so]
 0x00000001 (NEEDED)                     Shared library: [libxpcom.so]
 0x00000001 (NEEDED)                     Shared library: [libplds4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libplc4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libnspr4.so.6]
 0x00000001 (NEEDED)                     Shared library: [libglade-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpangoxft-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpangox-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgnome-desktop-2.so.2]
 0x00000001 (NEEDED)                     Shared library: [libgnomeui-2.so.0]
 0x00000001 (NEEDED)                     Shared library: [libjpeg.so.62]
 0x00000001 (NEEDED)                     Shared library: [libstartup-notification-1.so.0]
 0x00000001 (NEEDED)                     Shared library: [libbonoboui-2.so.0]
 0x00000001 (NEEDED)                     Shared library: [libSM.so.6]
 0x00000001 (NEEDED)                     Shared library: [libICE.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgnome-keyring.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgnomecanvas-2.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgnome-2.so.0]
 0x00000001 (NEEDED)                     Shared library: [libesd.so.0]
 0x00000001 (NEEDED)                     Shared library: [libaudiofile.so.0]
 0x00000001 (NEEDED)                     Shared library: [libart_lgpl_2.so.2]
 0x00000001 (NEEDED)                     Shared library: [libgtk-x11-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgdk-x11-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libatk-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgdk_pixbuf-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpangocairo-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpangoft2-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpango-1.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libcairo.so.2]
 0x00000001 (NEEDED)                     Shared library: [libXrender.so.1]
 0x00000001 (NEEDED)                     Shared library: [libX11.so.6]
 0x00000001 (NEEDED)                     Shared library: [libXau.so.6]
 0x00000001 (NEEDED)                     Shared library: [libXdmcp.so.6]
 0x00000001 (NEEDED)                     Shared library: [libpng12.so.0]
 0x00000001 (NEEDED)                     Shared library: [libfontconfig.so.1]
 0x00000001 (NEEDED)                     Shared library: [libfreetype.so.6]
 0x00000001 (NEEDED)                     Shared library: [libexpat.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgnomevfs-2.so.0]
 0x00000001 (NEEDED)                     Shared library: [libxml2.so.2]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libssl.so.0.9.7]
 0x00000001 (NEEDED)                     Shared library: [libcrypto.so.0.9.7]
 0x00000001 (NEEDED)                     Shared library: [libresolv.so.0]
 0x00000001 (NEEDED)                     Shared library: [libbonobo-2.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgconf-2.so.4]
 0x00000001 (NEEDED)                     Shared library: [libbonobo-activation.so.4]
 0x00000001 (NEEDED)                     Shared library: [libORBitCosNaming-2.so.0]
 0x00000001 (NEEDED)                     Shared library: [libORBit-2.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpopt.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgobject-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libm.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgmodule-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libdl.so.0]
 0x00000001 (NEEDED)                     Shared library: [libgthread-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libglib-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libuClibc++.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]
 0x00000001 (NEEDED)                     Shared library: [ld-uClibc.so.0]
 0x00000001 (NEEDED)                     Shared library: [libxpcom_core.so]
 0x0000000f (RPATH)                      Library rpath: [/usr/lib/mozilla-firefox]
 0x0000001d (RUNPATH)                    Library runpath: [/usr/lib/mozilla-firefox]
 0x0000000c (INIT)                       0x2ee4c
 0x0000000d (FINI)                       0x119564
 0x00000004 (HASH)                       0x148
 0x00000005 (STRTAB)                     0x11600
 0x00000006 (SYMTAB)                     0x5250
 0x0000000a (STRSZ)                      85523 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x15b708
 0x00000002 (PLTRELSZ)                   10672 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x2c49c
 0x00000011 (REL)                        0x26414
 0x00000012 (RELSZ)                      24712 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x0000001e (FLAGS)                      BIND_NOW
 0x6ffffffb (FLAGS_1)                    Flags: NOW
 0x6ffffffa (RELCOUNT)                   2625
 0x00000000 (NULL)                       0x0

RPATH and RUNPATH are defined, the comment in dl-elf.c says that order is 
RPATH/LD_LIBRARY_PATH/RUNPATH, but none of the checks show RPATH being 
checked, all look like below, unless found in RUNPATH; then the cache 
check is omitted

> _dl_get_ready_to_run:621: 	file='libplds4.so.6';  needed by 'galeon'
> _dl_load_shared_library:212: 	find library='libplds4.so.6'; searching
> _dl_load_shared_library:255: 	searching RUNPATH='/usr/lib/mozilla-firefox'
> _dl_load_shared_library:273: 	searching cache='/etc/ld.so.cache'
> _dl_load_elf_shared_library:618: 
> 	file='/usr/lib/nspr/libplds4.so.6';  generating link map
> _dl_load_elf_shared_library:619: 		dynamic: 0x25785ebc  base: 0x25782000
> _dl_load_elf_shared_library:621: 		  entry: 0x25782b08  phdr: 0x25782034  phnum: 0x6

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list