Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Feb 2006 15:13:31 -0800
From:      othermark <atkin901@yahoo.com>
To:        freebsd-current@freebsd.org
Subject:   Re: Can't resolve defined(?) symbol after ELF symbol versioning
Message-ID:  <dtg6qr$pqn$1@sea.gmane.org>
References:  <20051224140019.d2311673.nork@FreeBSD.org> <20051224214308.fb94df1f.nork@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

warning!  crusty old quoted post below!  

Norikatsu Shigemura wrote:

> On Sat, 24 Dec 2005 14:00:19 +0900
> Norikatsu Shigemura <nork@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);




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dtg6qr$pqn$1>