From owner-freebsd-current@FreeBSD.ORG Thu Jun 22 16:31:13 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 6E01D16A482; Thu, 22 Jun 2006 16:31:13 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A8EC43D62; Thu, 22 Jun 2006 16:31:09 +0000 (GMT) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.13.6/8.13.6/NinthNine) with ESMTP id k5MGV6Yp012795; Fri, 23 Jun 2006 01:31:08 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Fri, 23 Jun 2006 01:31:06 +0900 From: Norikatsu Shigemura To: Alexander@Leidinger.net Message-Id: <20060623013106.d4397e26.nork@FreeBSD.org> In-Reply-To: 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> X-Mailer: Sylpheed version 2.2.6 (GTK+ 2.8.19; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (sakura.ninth-nine.com [219.127.74.121]); Fri, 23 Jun 2006 01:31:08 +0900 (JST) Cc: Daniel Eischen , freebsd-current@FreeBSD.org, nork@FreeBSD.org Subject: Re: Linux-flashplugin7 & rtld - RFC 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: Thu, 22 Jun 2006 16:31:13 -0000 On Wed, 21 Jun 2006 12:39:09 -0400 (EDT) Daniel Eischen wrote: > >> I'm implementing like following codes to libc/libm/libpthread > >> on 7-current with SYMVER_ENABLED=yes. > > [example] > > Ugh... I like parts of this (it's the same I thought about myself), but parts > > of this are... not optimal in my opinion. > > I don't like to spam our libXXX to contain GLIBC symbols. First I feared that > I don't think that is the intent and I would oppose polluting > our base libraries with GLIBC symbols. I think the proposed > solution was to make separate libraries with the GLIBC symbols > that just call out to our own libraries, and use libmap.conf Affirmative. ELF Symbol Versioning means no function of netchild@ as said. spamming? junk symbols? Humm... I don't think so, but it is POLICY that I think. Althought I'm working, I want to merge 'Userland COMPAT_LINUX technology' to FreeBSD source tree. I hope that you do consent. So I hope to discuss @GLIBC_2.* symbols:-). > accordingly. I have tried this months ago and think I ran > into the same problem that nork has run into -- the loader > doesn't load the mapped libraries because it thinks libc > (our own libc) is already loaded. I think so, too. > > 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. Yes. I did try to do things, but I didn't get any good way. And, 'LICENSE PROBLEM'. We cannot change libflashplugin.so. Now therefore, the way of objdump is none. FYI: I heard one Flash sound on firefox and flash7 and Userland COMPAT_LINUX and 7-current, but didn't display images:-(. I implemented following 29 functions. $ fgrep -r // lib*-glibc/00sample.c libc-glibc/00sample.c://hook_and_abort_2(__xstat, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(close, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(dlsym, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(fcntl, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(free, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(getenv, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(gettimeofday, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(ioctl, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(malloc, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(memcpy, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(memset, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(open, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(select, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(setlocale, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(shmat, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(shmget, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(strchr, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(strcmp, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(strcpy, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(write, 2, 0); libc-glibc/00sample.c://hook_and_abort_2(dlopen, 2, 1); libc-glibc/00sample.c://hook_and_abort_3(__cxa_atexit, 2, 1, 3); libc-glibc/00sample.c://hook_and_abort_3(__cxa_finalize, 2, 1, 3); libpthread-glibc/00sample.c://hook_and_abort_2(pthread_create, 2, 1); libpthread-glibc/00sample.c://hook_and_abort_2(pthread_mutex_destroy, 2, 0); libpthread-glibc/00sample.c://hook_and_abort_2(pthread_mutex_init, 2, 0); libpthread-glibc/00sample.c://hook_and_abort_2(pthread_mutex_lock, 2, 0); libpthread-glibc/00sample.c://hook_and_abort_2(pthread_mutex_trylock, 2, 0); libpthread-glibc/00sample.c://hook_and_abort_2(pthread_mutex_unlock, 2, 0);