[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with elf symbol PLT lookup in glibc 2.3.1 - linux
From: |
Lars Oppermann |
Subject: |
Problems with elf symbol PLT lookup in glibc 2.3.1 - linux |
Date: |
Thu, 13 Feb 2003 16:43:46 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210 |
Hi everyone...
I experince the following problem with glibc-2.3.1 on linux, which
sometimes seems to go away or happens with different symbols, when
some libraries that are dynamically linked with the application change.
From a function
SvxFontHeightToolBoxControll::StateChanged([...])
we try to call the non-virtual function
SvxFontSizeBox_Impl::StateChanged_Impl([...])
on a member pBox (pBox->StateChanged_Impl([...]))
When ld.so tries to find the corresponing symbol (through PLT)
_ZN19SvxFontSizeBox_Impl17StateChanged_ImplEtPK11SfxPoolItem
which is in libsvx644li.so, as nm shows:
005aa8a0 T _ZN19SvxFontSizeBox_Impl17StateChanged_ImplEtPK11SfxPoolItem
or objdump -T
005aa8a0 g DF .text 000000db Base _ZN19SvxFontSizeBox_[...]
stepi'ng through the whole lookup process looks ok to me, but I am no
expert at that. _dl_runtime_lookup gets on the stackframe, fixup() is
called and tries to do a _dl_lookup_versioned_symbol
(elf/dl-runtime.c:92), which I think is strange since this is not a
library that uses version information.
the lookup produces the following error:
/soffice.bin: relocation error: ./libsvx644li.so:
symbol _ZN19SvxFontSizeBox_Impl17StateChanged_ImplEtPK11SfxPoolItem,
version UDK_3_0_0 not defined in file libsal.so.3 with link time reference
UDK_3_0_0 is defined in libsal.so.3 but the symbol in question is (as
mentioned above in libsvx644li.so)
By using LD_DEBUG=symbols I can see that ld.so is looking into libsal
before it is looking into libsvx and reports the error before it gets to
look at libsvx and find the symbol:
19821:
symbol=_ZN19SvxFontSizeBox_Impl17StateChanged_ImplEtPK11SfxPoolItem;
lookup in file=./soffice.bin
[...] lookup in file=./libsvl644li.so
[...] lookup in file=./libvcl644li.so
[...] lookup in file=./libcppu.so.3
[...] lookup in file=./libcppuhelpergcc3.so.3
[...] lookup in file=./libtl644li.so
[...] lookup in file=./libvos2gcc3.so
[...] lookup in file=./libsal.so.3
19821: ./libsvx644li.so: error: relocation error: symbol
_ZN19SvxFontSizeBox_Impl17StateChanged_ImplEtPK11SfxPoolItem, version
UDK_3_0_0 not defined in file libsal.so.3 with link
time reference (fatal)
The lookup of the privous symbol from libsvx works flawlessly. Starts
like the last example, passes along libsal and some 20-30 libs later
concludes with
[...] file=./libso644li.so
[...] file=./libj644li_g.so
[...] file=./libofa644li.so
19821: symbol=_ZN17SvxFontHeightItem4IsOfEPFPvvE; lookup in
file=./libsvx644li.so
nm libsvx644li.so shows
0036b8c0 T _ZN17SvxFontHeightItem4IsOfEPFPvvE
or objdump -T
0036b8c0 g DF .text 0000003b Base _ZN17SvxFontHeightItem[...]
With different builds and different systems this tends to happen with
various symbols or sometimes doesn't happen at all.
Last but not least, if I set LD_BIND_NOW=1 everything works.
Does anyone have any idea what is going wrong here?
Bests,
Lars
--
Lars Oppermann <address@hidden> Sun Microsystems
Software Engineer - StarOffice Sachsenfeld 4
Phone: +49 40 23646 959 D-20097 Hamburg
Fax: +49 40 23646 550 http://www.sun.com/staroffice
- Problems with elf symbol PLT lookup in glibc 2.3.1 - linux,
Lars Oppermann <=