Re: Linux-flashplugin7 & rtld - RFC

From: Alexander Kabaev <kabaev_at_gmail.com>
Date: Wed, 21 Jun 2006 08:54:40 -0400
On Wed, 21 Jun 2006 19:25:01 +0900 (JST)
"Norikatsu Shigemura" <nork_at_FreeBSD.org> wrote:

> > Quoting Norikatsu Shigemura <nork_at_freebsd.org> (from Wed, 21 Jun
> > 2006 15:36:19 +0900 (JST)):
> >>> Nork-san says that it is hard to make LPW work on 7-CURRENT.
> >>> But, he is trying to make it work with another approach.
> >> Yes, I'm working Userland COMPAT_LINUX technology[TM]:-).
> > Can you be a little bit more verbose what this is? Just a high level
> > overview. I'm curious since I have some ideas about some kind of
> > cross-compatibility "something" too (a combination of objcopy, a
> > liblinux2bsd and maybe some libmap stuff).
> 
> I'm implementing like following codes to libc/libm/libpthread
> on 7-current with SYMVER_ENABLED=yes.
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> #include <sys/types.h>
> #include <sys/cdefs.h>
> 
> #define SYM_COMPAT(sym, impl, ver)              \
>         __sym_compat(sym, impl, ver)
> #define GLIBC_SYMBOL_2(sym, major, minor)       \
>         GLIBC_##major##_##minor##_##sym
> #define GLIBC_COMPAT_2(sym, major, minor)       \
>         SYM_COMPAT(sym, GLIBC_SYMBOL_2(sym, major, minor), GLIBC_
> ##major. ##minor);
> 
> #include <string.h>
> 
> /*
>  * strcmp(3)
>  */
> GLIBC_COMPAT_2(strcmp, 2, 0);
> 
> int
> GLIBC_SYMBOL_2(strcmp, 2, 0)
>         (const char *s1, const char *s2)
> {
>         int ret;
>         ret = strcmp(s1, s2);
> 
>         dprintf("strcmp(\"%s\", \"%s\") = %d", s1, s2, ret);
> 
>         return ret;
> }
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> And Version.def, too.
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> # $FreeBSD$
> 
> GLIBC_2.0 {
>     strcmp;
>       :
> }
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "freebsd-current-unsubscribe_at_freebsd.org"

Thanks for doing this. This strikes me as much more robust and clean
way of doing things.

-- 
Alexander Kabaev

Received on Wed Jun 21 2006 - 10:54:48 UTC

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