Linux-flashplugin7 & rtld - RFC
Daniel Eischen
deischen at freebsd.org
Wed Jun 21 17:49:33 UTC 2006
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 at GLIBC_2.0
24: 000045df 0 FUNC GLOBAL DEFAULT 11 strcpy at GLIBC_2.0
25: 0000467b 0 FUNC GLOBAL DEFAULT 11 write at GLIBC_2.0
26: 00004303 0 FUNC GLOBAL DEFAULT 11 free at GLIBC_2.0
27: 000045c7 0 FUNC GLOBAL DEFAULT 11 strchr at GLIBC_2.0
[ ... ]
613: 0000454f 0 FUNC GLOBAL DEFAULT 11 select at GLIBC_2.0
615: 000043ab 0 FUNC GLOBAL DEFAULT 11 log at GLIBC_2.0
616: 00000000 0 OBJECT GLOBAL DEFAULT ABS GLIBC_2.1.3
619: 0000445f 0 FUNC GLOBAL DEFAULT 11 printf at GLIBC_2.0
620: 00004213 0 FUNC GLOBAL DEFAULT 11 abort at GLIBC_2.0
622: 00002250 114 FUNC GLOBAL DEFAULT 11 __xstat at GLIBC_2.0
624: 0000440b 0 FUNC GLOBAL DEFAULT 11 mmap at GLIBC_2.0
$ readelf -sW acrobat.so | grep GLIBC
23: 00003057 0 FUNC GLOBAL DEFAULT 11 getenv at GLIBC_2.0
24: 00003207 0 FUNC GLOBAL DEFAULT 11 strcpy at GLIBC_2.0
25: 000032eb 0 FUNC GLOBAL DEFAULT 11 write at GLIBC_2.0
26: 0000301b 0 FUNC GLOBAL DEFAULT 11 free at GLIBC_2.0
27: 000031e3 0 FUNC GLOBAL DEFAULT 11 strchr at GLIBC_2.0
[ ... ]
465: 00002feb 0 FUNC GLOBAL DEFAULT 11 fopen at GLIBC_2.1
469: 00002b44 178 FUNC GLOBAL DEFAULT 11 connect at GLIBC_2.0
470: 00000000 0 OBJECT GLOBAL DEFAULT ABS GLIBC_2.1.3
473: 00002f37 0 FUNC GLOBAL DEFAULT 11 abort at GLIBC_2.0
474: 00002e04 114 FUNC GLOBAL DEFAULT 11 __xstat at GLIBC_2.0
475: 00003063 0 FUNC GLOBAL DEFAULT 11 getpwnam at GLIBC_2.0
--
DE
More information about the freebsd-current
mailing list