From owner-freebsd-current@FreeBSD.ORG Wed Jun 21 17:49:33 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 1B44516A474; Wed, 21 Jun 2006 17:49:33 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5835443D4C; Wed, 21 Jun 2006 17:49:32 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.6/8.13.6/NETPLEX) with ESMTP id k5LHnV6n021276; Wed, 21 Jun 2006 13:49:31 -0400 (EDT) Date: Wed, 21 Jun 2006 13:49:31 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Norikatsu Shigemura In-Reply-To: Message-ID: References: <44986777.6070601@FreeBSD.org> <20060621061437.GA53019@fit.vutbr.cz> <2265.211.18.249.19.1150871779.squirrel@mail.ninth-nine.com> <20060621121114.h6udocel5wsgg8sg@netchild.homeip.net> <2692.219.127.74.121.1150885501.squirrel@mail.ninth-nine.com> <20060621155053.d6lseiz8z4ow8wo8@netchild.homeip.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: Alexander Leidinger , freebsd-current@freebsd.org Subject: Re: Linux-flashplugin7 & rtld - RFC X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 17:49:33 -0000 On Wed, 21 Jun 2006, Daniel Eischen wrote: > On Wed, 21 Jun 2006, Alexander Leidinger wrote: > >> Did you tried to put this into a liblinux2bsd? The idea I had was to try if >> such a lib can be "attached" to e.g. linux flashplugin. Either with some >> objcopy (or similar) stuff, by trying to link again (with liblinux2bsd), or >> with libmap.conf. Another nice try is to have a program/script which does >> some known obj* stuff with object files, libs and/or programs. The examples >> I wanted to look at with this stuff are your linuxpluginwrapper, the >> linuxthreads port, my icc port and maybe the ifc port (it's basically an >> adoption of my icc port, but AFAIR there are some enhancements). All of >> them contain already some kind of mappings between linux and bsd. And maybe >> a combination of both ways (liblinux2bsd and a script which does obj* >> stuff) could lead to a successfull assimilation of some linux-only stuff. > > When I was playing around with trying to get linuxpluginwrapper to > work, I had scripts that parsed the undefined symbols from > flashplayer.so and automatically created a library with those > symbols (that called out to our own libc functions). It wasn't > that hard to do, but I got side-tracked and never was able to > get rtld to load the mapped library. My latest attempt is here: http://people.freebsd.org/~deischen/lpw.tgz It's based on the linuxpluginwrapper port from a few months ago, so it's probably a little out of date. But using it, I can produce a flash7.so and acrobat.so with: $ readelf -sW flash7.so | grep GLIBC 23: 0000434b 0 FUNC GLOBAL DEFAULT 11 getenv@GLIBC_2.0 24: 000045df 0 FUNC GLOBAL DEFAULT 11 strcpy@GLIBC_2.0 25: 0000467b 0 FUNC GLOBAL DEFAULT 11 write@GLIBC_2.0 26: 00004303 0 FUNC GLOBAL DEFAULT 11 free@GLIBC_2.0 27: 000045c7 0 FUNC GLOBAL DEFAULT 11 strchr@GLIBC_2.0 [ ... ] 613: 0000454f 0 FUNC GLOBAL DEFAULT 11 select@GLIBC_2.0 615: 000043ab 0 FUNC GLOBAL DEFAULT 11 log@GLIBC_2.0 616: 00000000 0 OBJECT GLOBAL DEFAULT ABS GLIBC_2.1.3 619: 0000445f 0 FUNC GLOBAL DEFAULT 11 printf@GLIBC_2.0 620: 00004213 0 FUNC GLOBAL DEFAULT 11 abort@GLIBC_2.0 622: 00002250 114 FUNC GLOBAL DEFAULT 11 __xstat@GLIBC_2.0 624: 0000440b 0 FUNC GLOBAL DEFAULT 11 mmap@GLIBC_2.0 $ readelf -sW acrobat.so | grep GLIBC 23: 00003057 0 FUNC GLOBAL DEFAULT 11 getenv@GLIBC_2.0 24: 00003207 0 FUNC GLOBAL DEFAULT 11 strcpy@GLIBC_2.0 25: 000032eb 0 FUNC GLOBAL DEFAULT 11 write@GLIBC_2.0 26: 0000301b 0 FUNC GLOBAL DEFAULT 11 free@GLIBC_2.0 27: 000031e3 0 FUNC GLOBAL DEFAULT 11 strchr@GLIBC_2.0 [ ... ] 465: 00002feb 0 FUNC GLOBAL DEFAULT 11 fopen@GLIBC_2.1 469: 00002b44 178 FUNC GLOBAL DEFAULT 11 connect@GLIBC_2.0 470: 00000000 0 OBJECT GLOBAL DEFAULT ABS GLIBC_2.1.3 473: 00002f37 0 FUNC GLOBAL DEFAULT 11 abort@GLIBC_2.0 474: 00002e04 114 FUNC GLOBAL DEFAULT 11 __xstat@GLIBC_2.0 475: 00003063 0 FUNC GLOBAL DEFAULT 11 getpwnam@GLIBC_2.0 -- DE