Re: Linux-flashplugin7 & rtld - RFC

From: Daniel Eischen <deischen_at_freebsd.org>
Date: Wed, 21 Jun 2006 13:49:31 -0400 (EDT)
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
Received on Wed Jun 21 2006 - 15:49:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:57 UTC