Date: Fri, 12 Aug 2005 03:47:30 +0900 (JST) From: Norikatsu Shigemura <nork@FreeBSD.org> To: "M. Warner Losh" <imp@bsdimp.com> Cc: hackers@FreeBSD.org, dnelson@allantgroup.com, ume@FreeBSD.org Subject: Re: Converting libfoo.so for linux to freebsd Message-ID: <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com> In-Reply-To: <20050811.104604.61335403.imp@bsdimp.com> References: <20050809.133734.08360256.imp@bsdimp.com> <20050809213130.GB71687@dan.emsphone.com> <ygevf2e4c42.wl%ume@mahoroba.org> <20050811.104604.61335403.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Linuxpluginwrapper(LPW) is a most famous killer application of libmap.conf(5)! (I think:-) On Thu, 11 Aug 2005 10:46:04 -0600 (MDT) "M. Warner Losh" <imp@bsdimp.com> wrote: > Here's a breif outline of what I've learned: > (1) To remove the symbol versioning goo from a shared library, > objcopy -R .gnu.version linux.so freebsd.so > (there's also a .gnu.version_r on some libraries, that can > also be removed this way). Doing this allows one to directly > link the .so into your program, modulo ABI issues. Humm, When I made LPW, I didn't have a trouble about symbol versioning. I think no need objcopy. > (2) dlopen (and likely ld-elf.so in general) doesn't check the > version information at all. If all you are doing is linking > dynamically at run time, you don't have to perform step #1. > The compile time linker, however, whines about missing symbol > versions. > (3) Use libmap.conf to map libc.so.6 for the shared library > that you are loading to overcome ABI issues. See the man page > for an example. Humm.. I have no comment. > The linuxplugwrapper port can be used to generate shims for the ABI > issues, in general, and works well. I'll likely not use it for the > brother scanner port I'm working on since all I need is stderr defined > in a linuxly correct, and I can do that in the source part of the > driver. I'd love to get the network side of things working, but I > think that might be more effort than I care to go to at the moment. > I'd also like to get faxing and printing working, but again, time... > I bought it for the 35 sheet document feeder + scanner at $100.00 > after rebate :-) LPW has a FORCE ABOUTER[TM:-)]. $ cd /usr/ports/www/linuxpluginwrapper $ make extract $ cd work/linuxpluginwrapper-20050613 $ make dummy.c TARGET_PLUGIN=LINUX_SHARED_LIBRARY_YOU_WANT.so $ mv dummy.c dummy_APPLICATION_NAME.c please add dummy_APPLICATION_NAME.o and related macros to Makefile on top directory. So you can develop pluginwrapper like acrobat/flash7/realplayer support:-).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508111847.j7BIlUvQ085453>