Re: Can't resolve defined(?) symbol after ELF symbol versioning

From: othermark <atkin901_at_yahoo.com>
Date: Tue, 21 Feb 2006 15:13:31 -0800
warning!  crusty old quoted post below!  

Norikatsu Shigemura wrote:

> On Sat, 24 Dec 2005 14:00:19 +0900
> Norikatsu Shigemura <nork_at_FreeBSD.org> wrote:
>> 2. "T" (the symbol is in the text (code) section) symbol
>> cannot be resolved like following behavior.
>> $ firefox /home/nork/Flash/AYB2.swf
>> LoadPlugin: failed to initialize shared library
>> /usr/X11R6/lib/linux-flashplugin7/libflashplayer.so
>> [/usr/X11R6/lib/linux-flashplugin7/libflashplayer.so: Undefined symbol
>> "_ZN12NetworkASyncD1Ev"]
> 
> Oops, case: new rtld.c
> $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.111 2005/12/23 15:30:53 kan Exp
> $
> 
> $ firefox /home/nork/Flash/maiyahi.swf
> LoadPlugin: failed to initialize shared library
> /usr/X11R6/lib/linux-flashplugin7/libflashplayer.so
> [/usr/local/lib/pluginwrapper/browser.so does not have version
> information, but /usr/X11R6/lib/linux-flashplugin7/libflashplayer.so
> requires it]
> 
> I should study about ELF symbol versioning.

A couple of references first:

http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_node/ld_25.html
http://lists.debian.org/lsb-spec/1999/12/msg00017.html

I thought at first I could get flash7.so on -current to work simply by
dumping all the defined symbols compiled into flash7 in to a version script
for use by the linker.   

I took the brute force approach since I don't know which version (2.0 or
2.1) that the flashplayer plugin is actually looking for in each of this
functions.

flash7.vsc
GLIBC_2.1 { __errno_location; __fxstat; __strdup; __strtol_internal;
__strtoul_internal; __xstat; _fini; _init; accept; bind; connect; dlsym;
fcntl; getsockopt; ioctl; open; pthread_mutex_init; setsockopt; shmat;
shmctl; socket; }; 
GLIBC_2.0 { __errno_location; __fxstat; __strdup; __strtol_internal;
__strtoul_internal; __xstat; _fini; _init; accept; bind; connect; dlsym;
fcntl; getsockopt; ioctl; open; pthread_mutex_init; setsockopt; shmat;
shmctl; socket; }; 

I then compile that into flash7.so via 

-Xlinker "--version-script=flash7.vsc"

and get symbols:

readelf --version-info flash7.so

(snip)


However, now when I attempt to use the wrapper, I get the following:

LoadPlugin: failed to initialize shared
library /usr/X11R6/lib/linux-flashplugin7/libflashplayer.so
[/lib/libm.so.4: version GLIBC_2.0 required
by /usr/X11R6/lib/linux-flashplugin7/libflashplayer.so not defined]


libm.so.4 is spec'd as .so.6 by /etc/libmap.conf.   In order to make this
work am I going to have to wrap libm functions as well?   I thinking yes,
since I don't think we want GLIBC_2.0 tagged on the native freebsd
libm.so.6

-- 
othermark
atkin901 at nospam dot yahoo dot com
(!wired)?(coffee++):(wired);
Received on Tue Feb 21 2006 - 22:13:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:52 UTC