Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Aug 2005 13:51:47 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        nork@FreeBSD.org
Cc:        hackers@FreeBSD.org, dnelson@allantgroup.com, ume@FreeBSD.org
Subject:   Re: Converting libfoo.so for linux to freebsd
Message-ID:  <20050811.135147.21959222.imp@bsdimp.com>
In-Reply-To: <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com>
References:  <ygevf2e4c42.wl%ume@mahoroba.org> <20050811.104604.61335403.imp@bsdimp.com> <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200508111847.j7BIlUvQ085453@sakura.ninth-nine.com>
            Norikatsu Shigemura <nork@FreeBSD.org> writes:
: 	Linuxpluginwrapper(LPW) is a most famous killer application
: 	of libmap.conf(5)!  (I think:-)

Definitely.  While threading games are interesting, the linux plugin
wrapper definitely is much more useful.

: 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.

If you are building programs from source and linking directly to these
libraries, then the objcopy is needed.  If you are just coaxing
binaries to run that have already been linked, then no objcopy is
needed.  Also, if you load the library via dlopen, no objcopy is
needed.

: > 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:-).

I noticed that when I was looking at the wrapepr.  Definitely very
cool tools to help in development.  I was lucky that the Linux library
I needed to run touched so few symbols.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050811.135147.21959222.imp>