From owner-freebsd-current Mon Sep 21 19:28:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA19810 for freebsd-current-outgoing; Mon, 21 Sep 1998 19:28:20 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from rf900.physics.usyd.edu.au (rf900.physics.usyd.edu.au [129.78.129.109]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA19719 for ; Mon, 21 Sep 1998 19:27:46 -0700 (PDT) (envelope-from dawes@rf900.physics.usyd.edu.au) Received: (from dawes@localhost) by rf900.physics.usyd.edu.au (8.8.5/8.8.2) id MAA09200; Tue, 22 Sep 1998 12:27:11 +1000 (EST) Message-ID: <19980922122710.D8838@rf900.physics.usyd.edu.au> Date: Tue, 22 Sep 1998 12:27:10 +1000 From: David Dawes To: dmaddox@scsn.net, current@FreeBSD.ORG Subject: Re: Loadable Modules in ELF XF86 Mail-Followup-To: dmaddox@scsn.net, current@FreeBSD.ORG References: <19980921163048.A869@scsn.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <19980921163048.A869@scsn.net>; from Donald J. Maddox on Mon, Sep 21, 1998 at 04:30:48PM +0000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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: > >------------------------------------------------------------------- > > >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" > > >------------------------------------------------------------------ > >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