Linux-flashplugin7 & rtld - RFC
Norikatsu Shigemura
nork at FreeBSD.org
Thu Jun 22 16:31:13 UTC 2006
On Wed, 21 Jun 2006 12:39:09 -0400 (EDT)
Daniel Eischen <deischen at freebsd.org> 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);
More information about the freebsd-current
mailing list