"symbol '': can't resolve symbol"
Joakim Tjernlund
joakim.tjernlund at transmode.se
Sun Jul 27 17:58:25 UTC 2008
On Sun, 2008-07-27 at 16:09 +0200, Stéphan Kochen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I have a problem executing several application with uClibc. Busybox
> appears to be working fine, even when linked dynamically. But, for
> example, dbus-daemon and bluez-util's hcid immediately exit with errors
> similar to the following:
>
> dbus-daemon: symbol '': can't resolve symbol in lib 'dbus-daemon'.
>
> I was able to obtain the full output of LD_DEBUG=all, and uploaded it at
> the following location:
> http://stephan.kochen.nl/proj/wii-oe/dbus-daemon_ld_debug.txt
>
> The environment I'm using is OpenEmbedded, cross-compiling on an x86 for
> PowerPC 750 (specifically, a Nintendo Wii). I produced the error above
> with uClibc from SVN, revisions:
> * 21996 (from about two months ago)
> * 22935 (latest at the time of writing)
> I've also tried 0.9.29, which simply segfaults.
>
> Now I really don't understand much of what is going on here. I cannot
> explain what appears to be garbage during the libexpat relocations;
> readelf and objdump seem to handle the file without any issues. However,
> the 'nameless' symbol that actually causes the program to exit appears
> to refer to this entry in .dynsym of dbus-daemon:
>
> Num: Value Size Type Bind Vis Ndx Name
> 1: 00000114 0 SECTION LOCAL DEFAULT 1
>
> The exact dbus-daemon and libexpat binaries I used are available at:
> http://stephan.kochen.nl/proj/wii-oe/dbus-daemon
> http://stephan.kochen.nl/proj/wii-oe/libexpat.so.1.5.0
>
> This is as much as I understand about the problem; I'm not sure how to
> proceed. I'll be happy to provide any more info at request. Can anyone
> help me with this problem?
>
> Thanks in advance,
> - -- Stéphan
Nintendo Wii, cool. What are you trying to do?
Thanks for so detailed report. It seems like you have build dbus-daemon
in a strange way. It is built similar to a shared lib and has both
TEXTREL and these "funny" relocs in it(use readelf -a to see):
0000529e 00000106 R_PPC_ADDR16_HA 00000114 .interp + 55248
000052a2 00000104 R_PPC_ADDR16_LO 00000114 .interp + 55248
000052c2 00000106 R_PPC_ADDR16_HA 00000114 .interp + 5270
000052c6 00000104 R_PPC_ADDR16_LO 00000114 .interp + 5270
000052ca 00000106 R_PPC_ADDR16_HA 00000114 .interp + 35f68
000052ce 00000104 R_PPC_ADDR16_LO 00000114 .interp + 35f68
000052d2 00000106 R_PPC_ADDR16_HA 00000114 .interp + 15820
000052d6 00000104 R_PPC_ADDR16_LO 00000114 .interp + 15820
000052d8 0000500a R_PPC_REL24 00000000 __uClibc_main + 0
There may be a bug in powerpc reloc code for ADDR_16_XX but you won't
get past ther REL24 reloc, you will get an unsupported error. See
ldso/powerpc/elfinterp.c, _dl_do_reloc()
What flags did you pass to the linker?
Jocke
More information about the uClibc
mailing list