Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 1998 12:27:10 +1000
From:      David Dawes <dawes@rf900.physics.usyd.edu.au>
To:        dmaddox@scsn.net, current@FreeBSD.ORG
Subject:   Re: Loadable Modules in ELF XF86
Message-ID:  <19980922122710.D8838@rf900.physics.usyd.edu.au>
In-Reply-To: <19980921163048.A869@scsn.net>; from Donald J. Maddox on Mon, Sep 21, 1998 at 04:30:48PM %2B0000
References:  <19980921163048.A869@scsn.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 21, 1998 at 04:30:48PM +0000, Donald J. Maddox wrote:
>    After building a ELF XFree86 from the port committed last night, I
>am seeing the following when starting the X server:
>
>-------------------------------------------------------------------
><SNIP>
>
>XF86Config: /etc/XF86Config
>(**) stands for supplied, (--) stands for probed/default values
>xf86Jstk.so: /usr/X11R6/lib/modules/xf86Jstk.so: Undefined symbol "xf86GetMotion
>Events"
>xie.so: /usr/X11R6/lib/modules/xie.so: Undefined symbol "isItTimeToYield"
>pex5.so: /usr/X11R6/lib/modules/pex5.so: Undefined symbol "EventSwapVector"
>
><SNIP>
>------------------------------------------------------------------
>
>Obviously, the X loadable modules don't work too well as ELF...  I assume
>that this can't possibly work, ELF LKMs with an a.out kernel, no?  Or am I
>just way off base here?
>
>    If this is the case, is there any way to force the loadable modules
>to be built as a.out until we have an ELF kernel?

These are X server modles, not kernel modules.  If the X server is ELF,
then its modules should be too.

My first guess is that the something like the following needs to be
added to FreeBSD.cf so that X server symbols get exported for use by
the modules:

#if UseElfFormat
#define DlLibrary	-rdynamic
#else
#define DlLibrary	/**/
#endif

#if BuildDynamicLoading
#define ServerExtraSysLibs	DlLibrary
#else
#define ServerExtraSysLibs	/**/
#endif


Another thing that probably needs to be changed is the definition of
PREPEND_UNDERSCORE in xfree86/common/xf86Dl.c, which determines whether
symbols passed to dlsym(3) include a leading underscore.  I'd suggest:

#if defined(CSRG_BASED) && !defined(__ELF__)
#define PREPEND_UNDERSCORE
#endif


David

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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