From owner-freebsd-current@FreeBSD.ORG Tue Feb 21 23:13:55 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24C3016A423 for ; Tue, 21 Feb 2006 23:13:55 +0000 (GMT) (envelope-from freebsd-current@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F5F143D48 for ; Tue, 21 Feb 2006 23:13:53 +0000 (GMT) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FBghT-00007L-Fy for freebsd-current@freebsd.org; Wed, 22 Feb 2006 00:13:43 +0100 Received: from gw205.f5.com ([205.229.151.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Feb 2006 00:13:43 +0100 Received: from atkin901 by gw205.f5.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Feb 2006 00:13:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: othermark Date: Tue, 21 Feb 2006 15:13:31 -0800 Lines: 79 Message-ID: References: <20051224140019.d2311673.nork@FreeBSD.org> <20051224214308.fb94df1f.nork@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: gw205.f5.com User-Agent: KNode/0.10.1 Sender: news Subject: Re: Can't resolve defined(?) symbol after ELF symbol versioning X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2006 23:13:55 -0000 warning! crusty old quoted post below! Norikatsu Shigemura wrote: > On Sat, 24 Dec 2005 14:00:19 +0900 > Norikatsu Shigemura 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);