diff options
author | Adam Jackson <ajax@theobromine.nwnk.net> | 2006-06-19 00:57:18 -0400 |
---|---|---|
committer | Adam Jackson <ajax@theobromine.nwnk.net> | 2006-06-19 00:57:18 -0400 |
commit | a28652f9c35fbc009245382a5cc2a022f42366fc (patch) | |
tree | a4ecb795533e87018b282d6d40a07db99560a5e2 /hw | |
parent | 98a602fab1f307a07a96868d7dae12b6f8d7f405 (diff) |
Another round of loader sense-beating. Remove the (unused) server export
lists, a really bad hash table, the last vestiges of the other backends,
and some miscellaneous cleanups. Good for dropping 300k from the size of
the built server on x86.
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/Makefile.am | 2 | ||||
-rw-r--r-- | hw/xfree86/loader/Makefile.am | 16 | ||||
-rw-r--r-- | hw/xfree86/loader/dixsym.c | 538 | ||||
-rw-r--r-- | hw/xfree86/loader/dlloader.c | 107 | ||||
-rw-r--r-- | hw/xfree86/loader/dlloader.h | 8 | ||||
-rw-r--r-- | hw/xfree86/loader/extsym.c | 84 | ||||
-rw-r--r-- | hw/xfree86/loader/fontsym.c | 112 | ||||
-rw-r--r-- | hw/xfree86/loader/hash.c | 356 | ||||
-rw-r--r-- | hw/xfree86/loader/hash.h | 40 | ||||
-rw-r--r-- | hw/xfree86/loader/loader.c | 248 | ||||
-rw-r--r-- | hw/xfree86/loader/loader.h | 150 | ||||
-rw-r--r-- | hw/xfree86/loader/loaderProcs.h | 7 | ||||
-rw-r--r-- | hw/xfree86/loader/loadext.c | 5 | ||||
-rw-r--r-- | hw/xfree86/loader/loadfont.c | 2 | ||||
-rw-r--r-- | hw/xfree86/loader/loadmod.c | 40 | ||||
-rw-r--r-- | hw/xfree86/loader/misym.c | 225 | ||||
-rw-r--r-- | hw/xfree86/loader/os.c | 4 | ||||
-rw-r--r-- | hw/xfree86/loader/xf86sym.c | 1183 |
18 files changed, 78 insertions, 3049 deletions
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index b50b6ab07..ab29d4d6d 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -36,12 +36,12 @@ DISTCLEANFILES = osandcommon.c xorg.c XORG_LIBS = \ @XORG_CORE_LIBS@ \ common/libinit.a \ - loader/libloader.a \ libosandcommon.la \ rac/librac.a \ parser/libxf86config.a \ dummylib/libdummy.a \ dixmods/libdixmods.la \ + loader/libloader.a \ @XORG_LIBS@ Xorg_DEPENDENCIES = \ diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am index 684087eae..502bb5aeb 100644 --- a/hw/xfree86/loader/Makefile.am +++ b/hw/xfree86/loader/Makefile.am @@ -1,10 +1,6 @@ noinst_LIBRARIES = libloader.a -INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../vbe \ - -I$(srcdir)/../ddc -I$(srcdir)/../int10 -I$(srcdir)/../i2c \ - -I$(srcdir)/../fbdevhw -I$(srcdir)/../scanpci -I$(srcdir)/../xaa \ - -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac -I$(srcdir)/../shadowfb \ - -I$(srcdir)/../dixmods/extmod -I$(srcdir)/../../../miext/cw \ - -I$(srcdir)/../../../miext/damage + +INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser #AM_LDFLAGS = -r AM_CFLAGS = -DIN_LOADER $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ @@ -15,10 +11,8 @@ endif EXTRA_DIST = \ dlloader.h \ - hash.h \ loader.h \ loaderProcs.h \ - sym.h \ SparcMulDiv.S libloader_a_SOURCES = \ @@ -29,10 +23,4 @@ libloader_a_SOURCES = \ loadfont.c \ dlloader.c \ os.c \ - dixsym.c \ - extsym.c \ - fontsym.c \ - misym.c \ - xf86sym.c \ - hash.c \ $(SPARC_SOURCES) diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c deleted file mode 100644 index 9ba50877e..000000000 --- a/hw/xfree86/loader/dixsym.c +++ /dev/null @@ -1,538 +0,0 @@ -/* $XdotOrg: xserver/xorg/hw/xfree86/loader/dixsym.c,v 1.21 2006/03/24 20:50:13 fredrik Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.63 2003/12/03 - * 17:11:29 tsi Exp $ */ - -/* - * Copyright 1995-1998 by Metro Link, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Metro Link, Inc. not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Metro Link, Inc. makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * Copyright (c) 1997-2003 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -#undef DBMALLOC -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include "sym.h" -#include "colormap.h" -#include "cursor.h" -#include "cursorstr.h" -#include "dix.h" -#include "dixevents.h" -#include "dixfont.h" -#include "dixstruct.h" -#include "misc.h" -#include "globals.h" -#include "os.h" -#include "osdep.h" -#include "resource.h" -#include "servermd.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include "extension.h" -#define EXTENSION_PROC_ARGS void * -#include "extnsionst.h" -#include "swaprep.h" -#include "swapreq.h" -#include "inputstr.h" -#include <X11/extensions/XIproto.h> -#include "exevents.h" -#include "extinit.h" -#ifdef XV -#include "xvmodproc.h" -#endif -#include "dgaproc.h" -#ifdef RENDER -#include "mipict.h" -#include "renderedge.h" -#endif -#include "selection.h" -#ifdef XKB -#include <X11/extensions/XKBsrv.h> -extern int XkbDfltRepeatDelay, XkbDfltRepeatInterval; -#endif - -extern Selection *CurrentSelections; -extern int NumCurrentSelections; - -/* DIX things */ - -LOOKUP dixLookupTab[] = { - - /* dix */ - /* atom.c */ - SYMFUNC(MakeAtom) - SYMFUNC(ValidAtom) - /* colormap.c */ - SYMFUNC(AllocColor) - SYMFUNC(CreateColormap) - SYMFUNC(FakeAllocColor) - SYMFUNC(FakeFreeColor) - SYMFUNC(FreeColors) - SYMFUNC(StoreColors) - SYMFUNC(TellLostMap) - SYMFUNC(TellGainedMap) - SYMFUNC(QueryColors) - /* cursor.c */ - SYMFUNC(FreeCursor) - /* devices.c */ - SYMFUNC(Ones) - SYMFUNC(InitButtonClassDeviceStruct) - SYMFUNC(InitFocusClassDeviceStruct) - SYMFUNC(InitLedFeedbackClassDeviceStruct) - SYMFUNC(InitPtrFeedbackClassDeviceStruct) - SYMFUNC(InitKbdFeedbackClassDeviceStruct) - SYMFUNC(InitIntegerFeedbackClassDeviceStruct) - SYMFUNC(InitStringFeedbackClassDeviceStruct) - SYMFUNC(InitBellFeedbackClassDeviceStruct) - SYMFUNC(InitValuatorClassDeviceStruct) - SYMFUNC(InitKeyClassDeviceStruct) - SYMFUNC(InitKeyboardDeviceStruct) - SYMFUNC(SendMappingNotify) - SYMFUNC(InitPointerDeviceStruct) - SYMFUNC(LookupKeyboardDevice) - SYMFUNC(LookupPointerDevice) - /* dispatch.c */ - SYMFUNC(SetInputCheck) - SYMFUNC(SendErrorToClient) - SYMFUNC(UpdateCurrentTime) - SYMFUNC(UpdateCurrentTimeIf) - SYMFUNC(ProcBadRequest) - SYMVAR(dispatchException) - SYMVAR(isItTimeToYield) - SYMVAR(ClientStateCallback) - SYMVAR(ServerGrabCallback) - SYMVAR(CurrentSelections) - SYMVAR(NumCurrentSelections) - /* dixfonts.c */ - SYMFUNC(CloseFont) - SYMFUNC(FontToXError) - SYMFUNC(LoadGlyphs) - SYMVAR(fpe_functions) - /* dixutils.c */ - SYMFUNC(AddCallback) - SYMFUNC(ClientSleep) - SYMFUNC(ClientTimeToServerTime) - SYMFUNC(ClientWakeup) - SYMFUNC(CompareTimeStamps) - SYMFUNC(CopyISOLatin1Lowered) - SYMFUNC(DeleteCallback) - SYMFUNC(LookupClient) - SYMFUNC(LookupDrawable) - SYMFUNC(LookupWindow) - SYMFUNC(NoopDDA) - SYMFUNC(QueueWorkProc) - SYMFUNC(RegisterBlockAndWakeupHandlers) - SYMFUNC(RemoveBlockAndWakeupHandlers) -#ifdef XCSECURITY - SYMFUNC(SecurityLookupDrawable) - SYMFUNC(SecurityLookupWindow) -#endif - /* events.c */ - SYMFUNC(CheckCursorConfinement) - SYMFUNC(DeliverEvents) - SYMFUNC(NewCurrentScreen) - SYMFUNC(PointerConfinedToScreen) - SYMFUNC(TryClientEvents) - SYMFUNC(WriteEventsToClient) - SYMFUNC(GetCurrentRootWindow) - SYMFUNC(GetSpritePosition) - SYMFUNC(GetSpriteWindow) - SYMFUNC(GetSpriteCursor) - SYMFUNC(WindowsRestructured) - SYMVAR(DeviceEventCallback) - SYMVAR(EventCallback) - SYMVAR(inputInfo) - SYMFUNC(SetCriticalEvent) -#ifdef PANORAMIX - SYMFUNC(XineramaGetCursorScreen) -#endif - /* property.c */ - SYMFUNC(ChangeWindowProperty) - /* extension.c */ - SYMFUNC(AddExtension) - SYMFUNC(AddExtensionAlias) - SYMFUNC(CheckExtension) - SYMFUNC(DeclareExtensionSecurity) - SYMFUNC(MinorOpcodeOfRequest) - SYMFUNC(StandardMinorOpcode) -#ifdef XEVIE - SYMVAR(xeviehot) - SYMVAR(xeviewin) -#endif - /* gc.c */ - SYMFUNC(CopyGC) - SYMFUNC(CreateGC) - SYMFUNC(CreateScratchGC) - SYMFUNC(ChangeGC) - SYMFUNC(dixChangeGC) - SYMFUNC(DoChangeGC) - SYMFUNC(FreeGC) - SYMFUNC(FreeScratchGC) - SYMFUNC(GetScratchGC) - SYMFUNC(SetClipRects) - SYMFUNC(ValidateGC) - SYMFUNC(VerifyRectOrder) - SYMFUNC(SetDashes) - /* globals.c */ - SYMVAR(ScreenSaverTime) -#ifdef DPMSExtension - SYMVAR(DPMSEnabled) - SYMVAR(DPMSCapableFlag) - SYMVAR(DPMSOffTime) - SYMVAR(DPMSPowerLevel) - SYMVAR(DPMSStandbyTime) - SYMVAR(DPMSSuspendTime) - SYMVAR(DPMSEnabledSwitch) - SYMVAR(DPMSDisabledSwitch) - SYMVAR(defaultDPMSEnabled) -#endif - /* bigreq */ - SYMVAR(maxBigRequestSize) -#ifdef XV - /* XXX These are exported from the DDX, not DIX. */ - SYMVAR(XvScreenInitProc) - SYMVAR(XvGetScreenIndexProc) - SYMVAR(XvGetRTPortProc) - SYMVAR(XvMCScreenInitProc) -#endif - SYMVAR(ScreenSaverBlanking) - SYMVAR(WindowTable) - SYMVAR(clients) - SYMVAR(currentMaxClients) - SYMVAR(currentTime) - SYMVAR(defaultColorVisualClass) - SYMVAR(display) - SYMVAR(globalSerialNumber) - SYMVAR(lastDeviceEventTime) - SYMVAR(monitorResolution) - SYMVAR(permitOldBugs) - SYMVAR(screenInfo) - SYMVAR(serverClient) - SYMVAR(serverGeneration) - /* main.c */ - SYMFUNC(NotImplemented) - SYMVAR(PixmapWidthPaddingInfo) - /* pixmap.c */ - SYMFUNC(AllocatePixmap) - SYMFUNC(GetScratchPixmapHeader) - SYMFUNC(FreeScratchPixmapHeader) - /* privates.c */ - SYMFUNC(AllocateClientPrivate) - SYMFUNC(AllocateClientPrivateIndex) - SYMFUNC(AllocateGCPrivate) - SYMFUNC(AllocateGCPrivateIndex) - SYMFUNC(AllocateWindowPrivate) - SYMFUNC(AllocateWindowPrivateIndex) - SYMFUNC(AllocateScreenPrivateIndex) - SYMFUNC(AllocateColormapPrivateIndex) - SYMFUNC(AllocateDevicePrivateIndex) - SYMFUNC(AllocateDevicePrivate) -#ifdef PIXPRIV - SYMFUNC(AllocatePixmapPrivateIndex) - SYMFUNC(AllocatePixmapPrivate) -#endif - /* resource.c */ - SYMFUNC(AddResource) - SYMFUNC(ChangeResourceValue) - SYMFUNC(CreateNewResourceClass) - SYMFUNC(CreateNewResourceType) - SYMFUNC(FakeClientID) - SYMFUNC(FreeResource) - SYMFUNC(FreeResourceByType) - SYMFUNC(GetXIDList) - SYMFUNC(GetXIDRange) - SYMFUNC(LookupIDByType) - SYMFUNC(LookupIDByClass) - SYMFUNC(LegalNewID) -#ifdef XCSECURITY - SYMFUNC(SecurityLookupIDByClass) - SYMFUNC(SecurityLookupIDByType) -#endif - SYMFUNC(FindClientResourcesByType) - SYMFUNC(FindAllClientResources) - SYMVAR(lastResourceType) - SYMVAR(TypeMask) -#ifdef RES - SYMFUNC(RegisterResourceName) - SYMVAR(ResourceNames) -#endif - /* swaprep.c */ - SYMFUNC(CopySwap32Write) - SYMFUNC(Swap32Write) - SYMFUNC(SwapConnSetupInfo) - SYMFUNC(SwapConnSetupPrefix) - /* swapreq.c */ - SYMFUNC(SwapShorts) - SYMFUNC(SwapLongs) - SYMFUNC(SwapColorItem) - /* tables.c */ - SYMVAR(EventSwapVector) - SYMVAR(ReplySwapVector) - SYMVAR(ProcVector) - /* window.c */ - SYMFUNC(ChangeWindowAttributes) - SYMFUNC(CheckWindowOptionalNeed) - SYMFUNC(CreateUnclippedWinSize) - SYMFUNC(CreateWindow) - SYMFUNC(FindWindowWithOptional) - SYMFUNC(GravityTranslate) - SYMFUNC(MakeWindowOptional) - SYMFUNC(MapWindow) - SYMFUNC(MoveWindowInStack) - SYMFUNC(NotClippedByChildren) - SYMFUNC(ResizeChildrenWinSize) - SYMFUNC(SaveScreens) - SYMFUNC(SendVisibilityNotify) - SYMFUNC(SetWinSize) - SYMFUNC(SetBorderSize) - SYMFUNC(TraverseTree) - SYMFUNC(UnmapWindow) - SYMFUNC(WalkTree) - SYMVAR(deltaSaveUndersViewable) - SYMVAR(numSaveUndersViewable) - SYMVAR(savedScreenInfo) - SYMVAR(screenIsSaved) - - /*os/ */ - /* access.c */ - SYMFUNC(LocalClient) - /* utils.c */ - SYMFUNC(Xstrdup) - SYMFUNC(XNFstrdup) - SYMVAR(Must_have_memory) - SYMFUNC(AdjustWaitForDelay) - SYMVAR(noTestExtensions) - SYMFUNC(GiveUp) - -#ifdef BIGREQS - SYMVAR(noBigReqExtension) -#endif -#ifdef COMPOSITE - SYMVAR(noCompositeExtension) -#endif -#ifdef DAMAGE - SYMVAR(noDamageExtension) -#endif -#ifdef DBE - SYMVAR(noDbeExtension) -#endif -#ifdef DPMSExtension - SYMVAR(noDPMSExtension) -#endif -#ifdef EVI - SYMVAR(noEVIExtension) -#endif -#ifdef FONTCACHE - SYMVAR(noFontCacheExtension) -#endif -#ifdef GLXEXT - SYMVAR(noGlxExtension) -#endif -#ifdef SCREENSAVER - SYMVAR(noScreenSaverExtension) -#endif -#ifdef MITSHM - SYMVAR(noMITShmExtension) -#endif -#ifdef MITMISC - SYMVAR(noMITMiscExtension) -#endif -#ifdef MULTIBUFFER - SYMVAR(noMultibufferExtension) -#endif -#ifdef RANDR - SYMVAR(noRRExtension) -#endif -#ifdef RENDER - SYMVAR(noRenderExtension) -#endif -#ifdef SHAPE - SYMVAR(noShapeExtension) -#endif -#ifdef XCSECURITY - SYMVAR(noSecurityExtension) -#endif -#ifdef XSYNC - SYMVAR(noSyncExtension) -#endif -#ifdef TOGCUP - SYMVAR(noXcupExtension) -#endif -#ifdef RES - SYMVAR(noResExtension) -#endif -#ifdef XAPPGROUP - SYMVAR(noXagExtension) -#endif -#ifdef XCMISC - SYMVAR(noXCMiscExtension) -#endif -#ifdef XEVIE - SYMVAR(noXevieExtension) -#endif -#ifdef XF86BIGFONT - SYMVAR(noXFree86BigfontExtension) -#endif -#ifdef XFreeXDGA - SYMVAR(noXFree86DGAExtension) -#endif -#ifdef XF86DRI - SYMVAR(noXFree86DRIExtension) -#endif -#ifdef XF86MISC - SYMVAR(noXFree86MiscExtension) -#endif -#ifdef XF86VIDMODE - SYMVAR(noXFree86VidModeExtension) -#endif -#ifdef XFIXES - SYMVAR(noXFixesExtension) -#endif -#ifdef XKB -/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */ - SYMVAR(noXkbExtension) -#endif -#ifdef PANORAMIX - SYMVAR(noPanoramiXExtension) -#endif -#ifdef XINPUT - SYMVAR(noXInputExtension) -#endif -#ifdef XIDLE - SYMVAR(noXIdleExtension) -#endif -#ifdef XV - SYMVAR(noXvExtension) -#endif - - /* log.c */ - SYMFUNC(LogVWrite) - SYMFUNC(LogWrite) - SYMFUNC(LogVMessageVerb) - SYMFUNC(LogMessageVerb) - SYMFUNC(LogMessage) - SYMFUNC(FatalError) - SYMFUNC(VErrorF) - SYMFUNC(ErrorF) - SYMFUNC(Error) - /* xalloc.c */ - SYMFUNC(XNFalloc) - SYMFUNC(XNFcalloc) - SYMFUNC(XNFrealloc) - SYMFUNC(Xalloc) - SYMFUNC(Xcalloc) - SYMFUNC(Xfree) - SYMFUNC(Xrealloc) - /* WaitFor.c */ - SYMFUNC(TimerFree) - SYMFUNC(TimerSet) - SYMFUNC(TimerCancel) - /* io.c */ - SYMFUNC(WriteToClient) - SYMFUNC(SetCriticalOutputPending) - SYMVAR(FlushCallback) - SYMVAR(ReplyCallback) - SYMVAR(SkippedRequestsCallback) - SYMFUNC(ResetCurrentRequest) - /* connection.c */ - SYMFUNC(IgnoreClient) - SYMFUNC(AttendClient) - SYMFUNC(AddEnabledDevice) - SYMFUNC(RemoveEnabledDevice) - SYMFUNC(MakeClientGrabPervious) - SYMFUNC(MakeClientGrabImpervious) - SYMVAR(GrabInProgress) - -#ifdef XKB - /* xkb/xkbInit.c */ - SYMFUNC(XkbInitKeyboardDeviceStruct) - SYMFUNC(XkbSetRulesDflts) - SYMVAR(XkbDfltRepeatDelay) - SYMVAR(XkbDfltRepeatInterval) -#endif - -#ifdef XINPUT - /* Xi */ - /* exevents.c */ - SYMFUNC(InitValuatorAxisStruct) - SYMFUNC(InitProximityClassDeviceStruct) - /* extinit.c */ - SYMFUNC(AssignTypeAndName) -#endif - - /* xf86DGA.c */ - /* XXX This is exported from the DDX, not DIX. */ - SYMVAR(XDGAEventBase) - - /* librender.a */ -#ifdef RENDER - /* picture.c */ - SYMFUNC(PictureInit) - SYMFUNC(PictureTransformPoint) - SYMFUNC(PictureTransformPoint3d) - SYMFUNC(PictureGetSubpixelOrder) - SYMFUNC(PictureSetSubpixelOrder) - SYMVAR(PictureScreenPrivateIndex) - /* mipict.c */ - SYMFUNC(miPictureInit) - SYMFUNC(miComputeCompositeRegion) - /* miglyph.c */ - SYMFUNC(miGlyphs) - /* mirect.c */ - SYMFUNC(miCompositeRects) - /* filter.c */ - SYMFUNC(PictureAddFilter) - SYMFUNC(PictureSetFilterAlias) - /* renderedge.c */ - SYMFUNC(RenderSampleCeilY) - SYMFUNC(RenderSampleFloorY) - SYMFUNC(RenderEdgeStep) - SYMFUNC(RenderEdgeInit) - SYMFUNC(RenderLineFixedEdgeInit) -#endif - - {0, 0} -}; diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c index 835deda49..3c62f863b 100644 --- a/hw/xfree86/loader/dlloader.c +++ b/hw/xfree86/loader/dlloader.c @@ -1,7 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.c,v 1.13 2003/10/15 16:29:02 dawes Exp $ */ - /* - * * Copyright (c) 1997 The XFree86 Project, Inc. * * Permission to use, copy, modify, distribute, and sell this software @@ -23,7 +20,18 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. */ + * SOFTWARE. + */ + +/* + * Once upon a time, X had multiple loader backends, three of which were + * essentially libdl reimplementations. This was nonsense so we chucked + * it, but we still retain the factorization between loader API and + * platform implementation. This file is the libdl implementation, and + * currently the only backend. If you find yourself porting to a platform + * without working libdl - hpux, win32, some forsaken a.out host, etc. - + * make a new backend rather than hacking up this file. + */ #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> @@ -36,82 +44,67 @@ #include <X11/Xos.h> #include "os.h" -#include "sym.h" #include "loader.h" #include "dlloader.h" -#ifdef DL_LAZY +#if defined(DL_LAZY) #define DLOPEN_LAZY DL_LAZY -#else -#ifdef RTLD_LAZY +#elif defined(RTLD_LAZY) #define DLOPEN_LAZY RTLD_LAZY -#else -#ifdef __FreeBSD__ +#elif defined(__FreeBSD__) #define DLOPEN_LAZY 1 #else #define DLOPEN_LAZY 0 #endif -#endif -#endif -#ifdef LD_GLOBAL + +#if defined(LD_GLOBAL) #define DLOPEN_GLOBAL LD_GLOBAL -#else -#ifdef RTLD_GLOBAL +#elif defined(RTLD_GLOBAL) #define DLOPEN_GLOBAL RTLD_GLOBAL #else #define DLOPEN_GLOBAL 0 #endif -#endif #if defined(CSRG_BASED) && !defined(__ELF__) -#define NEED_UNDERSCORE_FOR_DLLSYM +#define DLSYM_PREFIX "_" +#else +#define DLSYM_PREFIX "" #endif -/* - * This structure contains all of the information about a module - * that has been loaded. - */ typedef struct { int handle; void *dlhandle; int flags; } DLModuleRec, *DLModulePtr; -/* - * a list of loaded modules XXX can be improved - */ +/* Hooray, yet another open coded linked list! FIXME */ typedef struct DLModuleList { DLModulePtr module; struct DLModuleList *next; } DLModuleList; -DLModuleList *dlModuleList = NULL; +static DLModuleList *dlModuleList = NULL; -void * +static void * DLFindSymbolLocal(pointer module, const char *name) { DLModulePtr dlfile = module; void *p; char *n; -#ifdef NEED_UNDERSCORE_FOR_DLLSYM - static const char symPrefix[] = "_"; -#else - static const char symPrefix[] = ""; -#endif + static const char symPrefix[] = DLSYM_PREFIX; - n = xf86loadermalloc(strlen(symPrefix) + strlen(name) + 1); - sprintf(n, "%s%s", symPrefix, name); + n = malloc(strlen(symPrefix) + strlen(name) + 1); + if (strlen(symPrefix)) + sprintf(n, "%s%s", symPrefix, name); + else + sprintf(n, "%s", name); p = dlsym(dlfile->dlhandle, n); - xf86loaderfree(n); + free(n); return p; } - -/* - * Search a symbol in the module list - */ void * DLFindSymbol(const char *name) { @@ -127,75 +120,59 @@ DLFindSymbol(const char *name) return NULL; } -/* - * public interface - */ void * -DLLoadModule(loaderPtr modrec, int fd, LOOKUP ** ppLookup, int flags) +DLLoadModule(loaderPtr modrec, int fd, int flags) { DLModulePtr dlfile; DLModuleList *l; int dlopen_flags; - if ((dlfile = xf86loadercalloc(1, sizeof(DLModuleRec))) == NULL) { - ErrorF("Unable to allocate DLModuleRec\n"); + if ((dlfile = calloc(1, sizeof(DLModuleRec))) == NULL) { + ErrorF("Unable to allocate DLModuleRec\n"); return NULL; } dlfile->handle = modrec->handle; if (flags & LD_FLAG_GLOBAL) - dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL; + dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL; else - dlopen_flags = DLOPEN_LAZY; + dlopen_flags = DLOPEN_LAZY; dlfile->dlhandle = dlopen(modrec->name, dlopen_flags); if (dlfile->dlhandle == NULL) { ErrorF("dlopen: %s\n", dlerror()); - xf86loaderfree(dlfile); + free(dlfile); return NULL; } - l = xf86loadermalloc(sizeof(DLModuleList)); + l = malloc(sizeof(DLModuleList)); l->module = dlfile; l->next = dlModuleList; dlModuleList = l; - *ppLookup = NULL; return (void *)dlfile; } void -DLResolveSymbols(void *mod) -{ - return; -} - -int -DLCheckForUnresolved(void *mod) -{ - return 0; -} - -void DLUnloadModule(void *modptr) { DLModulePtr dlfile = (DLModulePtr) modptr; DLModuleList *l, *p; - /* remove it from dlModuleList */ + /* remove it from dlModuleList. */ if (dlModuleList->module == modptr) { l = dlModuleList; dlModuleList = l->next; - xf86loaderfree(l); + free(l); } else { p = dlModuleList; for (l = dlModuleList->next; l != NULL; l = l->next) { if (l->module == modptr) { p->next = l->next; - xf86loaderfree(l); + free(l); break; } p = l; } } dlclose(dlfile->dlhandle); - xf86loaderfree(modptr); + free(modptr); } diff --git a/hw/xfree86/loader/dlloader.h b/hw/xfree86/loader/dlloader.h index 6475291b5..b705a18d0 100644 --- a/hw/xfree86/loader/dlloader.h +++ b/hw/xfree86/loader/dlloader.h @@ -19,19 +19,15 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.h,v 1.2 1998/07/25 16:56:14 dawes Exp $ */ - #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif #ifndef _DLLOADER_H #define _DLLOADER_H -extern void *DLLoadModule(loaderPtr, int, LOOKUP **, int flags); -extern void DLResolveSymbols(void *); -extern int DLCheckForUnresolved(void *); + +extern void *DLLoadModule(loaderPtr, int, int flags); extern void DLUnloadModule(void *); extern void *DLFindSymbol(const char *name); -extern void *DLFindSymbolLocal(pointer module, const char *name); #endif diff --git a/hw/xfree86/loader/extsym.c b/hw/xfree86/loader/extsym.c deleted file mode 100644 index 1a841ac9a..000000000 --- a/hw/xfree86/loader/extsym.c +++ /dev/null @@ -1,84 +0,0 @@ -/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.5 2004/09/14 23:21:22 gisburn Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */ - -/* - * - * Copyright 1999-2003 by The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of The XFree86 Project, Inc. not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. The XFree86 Project, Inc. makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * THE XFREE86 PROJECT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE XFREE86 PROJECT, INC. BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include "resource.h" -#include "sym.h" -#include "misc.h" -#ifdef PANORAMIX -#include "panoramiX.h" -#endif -#include "sleepuntil.h" - -#ifdef HAS_SHM -extern int ShmCompletionCode; -extern int BadShmSegCode; -extern RESTYPE ShmSegType, ShmPixType; -#endif - -#ifdef PANORAMIX -extern Bool noPanoramiXExtension; -extern int PanoramiXNumScreens; -extern PanoramiXData *panoramiXdataPtr; -extern XID *PanoramiXVisualTable; -extern unsigned long XRT_WINDOW; -extern unsigned long XRT_PIXMAP; -extern unsigned long XRT_GC; -extern unsigned long XRT_COLORMAP; -extern unsigned long XRC_DRAWABLE; -extern Bool XineramaRegisterConnectionBlockCallback(void (*func) (void)); -extern int XineramaDeleteResource(pointer, XID); -#endif - -LOOKUP extLookupTab[] = { - - SYMFUNC(ClientSleepUntil) - -#ifdef HAS_SHM - SYMVAR(ShmCompletionCode) - SYMVAR(BadShmSegCode) - SYMVAR(ShmSegType) -#endif - -#ifdef PANORAMIX - SYMFUNC(XineramaRegisterConnectionBlockCallback) - SYMFUNC(XineramaDeleteResource) - SYMVAR(PanoramiXNumScreens) - SYMVAR(panoramiXdataPtr) - SYMVAR(PanoramiXVisualTable) - SYMVAR(XRT_WINDOW) - SYMVAR(XRT_PIXMAP) - SYMVAR(XRT_GC) - SYMVAR(XRT_COLORMAP) - SYMVAR(XRC_DRAWABLE) -#endif - - {0, 0} -}; diff --git a/hw/xfree86/loader/fontsym.c b/hw/xfree86/loader/fontsym.c deleted file mode 100644 index 5daf82802..000000000 --- a/hw/xfree86/loader/fontsym.c +++ /dev/null @@ -1,112 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/fontsym.c,v 1.14 2003/12/20 20:04:34 dawes Exp $ */ -/* - * Copyright (c) 1998-2002 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <X11/fonts/font.h> -#include "sym.h" -#include <X11/fonts/fntfilst.h> -#include <X11/fonts/fontenc.h> -#ifdef FONTENC_COMPATIBILITY -#include <X11/fonts/fontencc.h> -#endif -#include <X11/fonts/fntfilio.h> -#include <X11/fonts/fntfil.h> -#include <X11/fonts/fontutil.h> -#include <X11/fonts/fontxlfd.h> -#ifdef FONTCACHE -#define _FONTCACHE_SERVER_ -#include "fontcache.h" -#endif - -LOOKUP fontLookupTab[] = { - - SYMFUNC(TwoByteSwap) - SYMFUNC(FourByteSwap) - SYMFUNC(FontCouldBeTerminal) - SYMFUNC(BufFileRead) - SYMFUNC(BufFileWrite) - SYMFUNC(CheckFSFormat) - SYMFUNC(FontFileOpen) - SYMFUNC(FontFilePriorityRegisterRenderer) - SYMFUNC(FontFileRegisterRenderer) - SYMFUNC(FontParseXLFDName) - SYMFUNC(FontFileCloseFont) - SYMFUNC(FontFileOpenBitmap) - SYMFUNC(FontFileCompleteXLFD) - SYMFUNC(FontFileCountDashes) - SYMFUNC(FontFileFindNameInDir) - SYMFUNC(FontFileClose) - SYMFUNC(FontComputeInfoAccelerators) - SYMFUNC(FontDefaultFormat) - SYMFUNC(NameForAtom) - SYMFUNC(BitOrderInvert) - SYMFUNC(FontFileMatchRenderer) - SYMFUNC(RepadBitmap) - SYMFUNC(FontEncName) - SYMFUNC(FontEncRecode) - SYMFUNC(FontEncFind) - SYMFUNC(FontMapFind) - SYMFUNC(FontEncMapFind) - SYMFUNC(FontEncFromXLFD) - SYMFUNC(FontEncDirectory) - SYMFUNC(FontMapReverse) - SYMFUNC(FontMapReverseFree) - SYMFUNC(CreateFontRec) - SYMFUNC(DestroyFontRec) - SYMFUNC(GetGlyphs) - SYMFUNC(QueryGlyphExtents) - - SYMVAR(FontFileBitmapSources) - -#ifdef FONTENC_COMPATIBILITY - /* Obsolete backwards compatibility symbols -- fontencc.c */ - SYMFUNC(font_encoding_from_xlfd) - SYMFUNC(font_encoding_find) - SYMFUNC(font_encoding_recode) - SYMFUNC(font_encoding_name) - SYMFUNC(identifyEncodingFile) -#endif - -#ifdef FONTCACHE - /* fontcache.c */ - SYMFUNC(FontCacheGetSettings) - SYMFUNC(FontCacheGetStatistics) - SYMFUNC(FontCacheChangeSettings) - SYMFUNC(FontCacheOpenCache) - SYMFUNC(FontCacheCloseCache) - SYMFUNC(FontCacheSearchEntry) - SYMFUNC(FontCacheGetEntry) - SYMFUNC(FontCacheInsertEntry) - SYMFUNC(FontCacheGetBitmap) -#endif - - {0, 0} -}; diff --git a/hw/xfree86/loader/hash.c b/hw/xfree86/loader/hash.c deleted file mode 100644 index 393360f94..000000000 --- a/hw/xfree86/loader/hash.c +++ /dev/null @@ -1,356 +0,0 @@ -/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.3 2005/04/20 12:25:34 daniels Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.24 2003/11/17 22:20:40 dawes Exp $ */ - -/* - * - * Copyright 1995-1998 by Metro Link, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Metro Link, Inc. not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Metro Link, Inc. makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include "os.h" -#include <X11/Xos.h> -#undef abs -#include <stdlib.h> -#include "sym.h" -#include "loader.h" -#include "hash.h" - -#if defined(Lynx) -#define MAXINT 32000 -#else -#include <limits.h> -#undef MAXINT -#define MAXINT INT_MAX -#endif - -/* Prototypes for static functions. */ -static unsigned int hashFunc(const char *); -static itemPtr LoaderHashFindNearest(unsigned long); - -static itemPtr LoaderhashTable[HASHSIZE]; - -#ifdef DEBUG -static int hashhits[HASHSIZE]; - -void -DumpHashHits(void) -{ - int i; - int depth = 0; - int dev = 0; - - for (i = 0; i < HASHSIZE; i++) { - ErrorF("hashhits[%d]=%d\n", i, hashhits[i]); - depth += hashhits[i]; - } - - depth /= HASHSIZE; - ErrorF("Average hash depth=%d\n", depth); - - for (i = 0; i < HASHSIZE; i++) { - if (hashhits[i] < depth) - dev += depth - hashhits[i]; - else - dev += hashhits[i] - depth; - } - - dev /= HASHSIZE; - ErrorF("Average hash deviation=%d\n", dev); -} -#endif - -static unsigned int -hashFunc(const char *string) -{ - int i = 0; - - while (i < 10 && string[i]) - i++; - - if (i < 5) { -#ifdef DEBUG - hashhits[i]++; -#endif - return i; - } - -/* - * Original has function -#define HASH ((string[ i-4 ] * string[i-3] + string[i-2] ) & (HASHSIZE-1)) - */ - -#define HASH ((string[i-5] * string[ i-4 ] + string[i-3] * string[i-2] ) & (HASHSIZE-1)) - -#ifdef DEBUG - hashhits[HASH]++; -#endif - - return HASH; -} - -void -LoaderHashAdd(itemPtr entry) -{ - int bucket = hashFunc(entry->name); - itemPtr oentry; - - if ((oentry = LoaderHashFind(entry->name)) != NULL) - LoaderDuplicateSymbol(entry->name, oentry->handle); - - entry->next = LoaderhashTable[bucket]; - LoaderhashTable[bucket] = entry; - return; -} - -void -LoaderAddSymbols(int handle, int module, LOOKUP *list) -{ - LOOKUP *l = list, *exports = NULL; - itemPtr i, exportsItem = NULL; - char *modname; - - if (!list) - return; - - /* - * First look for a symbol called <name>ExportedSymbols. If it exists, - * only export the symbols that are listed in that array. Otherwise - * export all of the external symbols. - */ - modname = _LoaderHandleToCanonicalName(handle); - if (modname) { - char *exportname; - - exportname = xf86loadermalloc(strlen("ExportedSymbols") + - strlen(modname) + 1); - if (exportname) { - sprintf(exportname, "%sExportedSymbols", modname); - while (l->symName) { - if (strcmp(l->symName, exportname) == 0) { - exports = l; - ErrorF("LoaderAddSymbols: %s: %s found\n", modname, - exportname); - break; - } - l++; - } - xf86loaderfree(exportname); - } - } - - /* - * Allocate the exports list item first. - */ - if (exports) { - exportsItem = xf86loadermalloc(sizeof(itemRec)); - exportsItem->name = exports->symName; - exportsItem->address = (char *)exports->offset; - exportsItem->handle = handle; - exportsItem->module = module; - exportsItem->exports = NULL; - LoaderHashAdd(exportsItem); - } - - /* - * Visit every symbol in the lookup table, tagging it with the - * reference to the export list, if present. - */ - l = list; - while (l->symName) { - if (l != exports) { - i = xf86loadermalloc(sizeof(itemRec)); - i->name = l->symName; - i->address = (char *)l->offset; - i->handle = handle; - i->module = module; - i->exports = exportsItem; - LoaderHashAdd(i); - } - l++; - } -} - -itemPtr -LoaderHashDelete(const char *string) -{ - int bucket = hashFunc(string); - itemPtr entry; - itemPtr *entry2; - - entry = LoaderhashTable[bucket]; - entry2 = &(LoaderhashTable[bucket]); - while (entry) { - if (!strcmp(entry->name, string)) { - *entry2 = entry->next; - xf86loaderfree(entry->name); - xf86loaderfree(entry); - return 0; - } - entry2 = &(entry->next); - entry = entry->next; - } - return 0; -} - -itemPtr -LoaderHashFind(const char *string) -{ - int bucket = hashFunc(string); - itemPtr entry; - - entry = LoaderhashTable[bucket]; - while (entry) { - if (!strcmp(entry->name, string)) { - return entry; - } - entry = entry->next; - } - return 0; -} - -static itemPtr -LoaderHashFindNearest(unsigned long address) -{ - int i; - itemPtr entry, best_entry = 0; - long best_difference = MAXINT; - - for (i = 0; i < HASHSIZE; i++) { - entry = LoaderhashTable[i]; - while (entry) { - long difference = (long)address - (long)entry->address; - - if (difference >= 0) { - if (best_entry) { - if (difference < best_difference) { - best_entry = entry; - best_difference = difference; - } - } else { - best_entry = entry; - best_difference = difference; - } - } - entry = entry->next; - } - } - return best_entry; -} - -void -LoaderPrintSymbol(unsigned long address) -{ - itemPtr entry; - - entry = LoaderHashFindNearest(address); - if (entry) { - const char *module, *section; - -#if defined(__alpha__) || defined(__ia64__) - ErrorF("0x%016lx %s+%lx\n", (unsigned long)entry->address, - entry->name, address - (unsigned long)entry->address); -#else - ErrorF("0x%lx %s+%lx\n", (unsigned long)entry->address, entry->name, - address - (unsigned long)entry->address); -#endif - - if (_LoaderAddressToSection(address, &module, §ion)) - ErrorF("\tModule \"%s\"\n\tSection \"%s\"\n", module, section); - } else { - ErrorF("(null)\n"); - } -} - -void -LoaderPrintItem(itemPtr pItem) -{ - if (pItem) { - const char *module, *section; - -#if defined(__alpha__) || defined(__ia64__) - ErrorF("0x%016lx %s\n", (unsigned long)pItem->address, pItem->name); -#else - ErrorF("0x%lx %s\n", (unsigned long)pItem->address, pItem->name); -#endif - if (_LoaderAddressToSection((unsigned long)pItem->address, - &module, §ion)) - ErrorF("\tModule \"%s\"\n\tSection \"%s\"\n", module, section); - } else - ErrorF("(null)\n"); -} - -void -LoaderPrintAddress(const char *symbol) -{ - itemPtr entry; - - entry = LoaderHashFind(symbol); - LoaderPrintItem(entry); -} - -void -LoaderHashTraverse(void *card, int (*fnp)(void *, itemPtr)) -{ - int i; - itemPtr entry, last_entry = 0; - - for (i = 0; i < HASHSIZE; i++) { - last_entry = 0; - entry = LoaderhashTable[i]; - while (entry) { - if ((*fnp) (card, entry)) { - if (last_entry) { - last_entry->next = entry->next; - xf86loaderfree(entry->name); - xf86loaderfree(entry); - entry = last_entry->next; - } else { - LoaderhashTable[i] = entry->next; - xf86loaderfree(entry->name); - xf86loaderfree(entry); - entry = LoaderhashTable[i]; - } - } else { - last_entry = entry; - entry = entry->next; - } - } - } -} - -void -LoaderDumpSymbols() -{ - itemPtr entry; - int j; - - for (j = 0; j < HASHSIZE; j++) { - entry = LoaderhashTable[j]; - while (entry) { - LoaderPrintItem(entry); - entry = entry->next; - } - } - -} diff --git a/hw/xfree86/loader/hash.h b/hw/xfree86/loader/hash.h deleted file mode 100644 index 45617bd5f..000000000 --- a/hw/xfree86/loader/hash.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Copyright 1995-1998 by Metro Link, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Metro Link, Inc. not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Metro Link, Inc. makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.h,v 1.2.2.2 1998/07/04 13:32:45 dawes Exp $ */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#ifndef _HASH_H -#define _HASH_H - -#include "loader.h" - -typedef struct _HashIterator { - itemPtr pItem; - int bucket; -} HashIteratorRec, *HashIteratorPtr; - -#endif /* _HASH_H */ diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index 05df28103..da70b022a 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -1,5 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.c,v 1.71 2003/11/06 18:38:13 tsi Exp $ */ - /* * Copyright 1995-1998 by Metro Link, Inc. * @@ -71,7 +69,6 @@ #include <stdarg.h> #include "os.h" -#include "sym.h" #include "loader.h" #include "loaderProcs.h" #include "xf86.h" @@ -79,31 +76,11 @@ #include "compiler.h" -extern LOOKUP miLookupTab[]; -extern LOOKUP xfree86LookupTab[]; -extern LOOKUP dixLookupTab[]; -extern LOOKUP fontLookupTab[]; -extern LOOKUP extLookupTab[]; - -/* -#define DEBUG -#define DEBUGAR -#define DEBUGLIST -#define DEBUGMEM -*/ - -int check_unresolved_sema = 0; - #if defined(Lynx) && defined(sun) /* Cross build machine doesn;t have strerror() */ #define strerror(err) "strerror unsupported" #endif -#ifdef __UNIXOS2__ -void *os2ldcalloc(size_t, size_t); -#endif - -#ifdef HANDLE_IN_HASH_ENTRY /* * handles are used to identify files that are loaded. Even archives * are counted as a single file. @@ -113,7 +90,6 @@ void *os2ldcalloc(size_t, size_t); #define HANDLE_USED 1 static char freeHandles[MAX_HANDLE]; static int refCount[MAX_HANDLE]; -#endif #if defined(__sparc__) && defined(__GNUC__) && !defined(__FreeBSD__) # define SYMFUNCDOT(func) { "." #func, (funcptr)&__sparc_dot_ ## func }, @@ -133,26 +109,6 @@ DEFFUNCDOT(mul) DEFFUNCDOT(umul) DEFFUNCDOT(div) DEFFUNCDOT(udiv) -#ifdef linux -static LOOKUP SparcV89LookupTab[] = { - SYMFUNCDOT89(rem) - SYMFUNCDOT89(urem) - SYMFUNCDOT89(mul) - SYMFUNCDOT89(umul) - SYMFUNCDOT89(div) - SYMFUNCDOT89(udiv) - {0, 0} -}; -#endif -static LOOKUP SparcLookupTab[] = { - SYMFUNCDOT(rem) - SYMFUNCDOT(urem) - SYMFUNCDOT(mul) - SYMFUNCDOT(umul) - SYMFUNCDOT(div) - SYMFUNCDOT(udiv) - {0, 0} -}; #ifdef linux #if defined(__GNUC__) && defined(__GLIBC__) @@ -220,22 +176,6 @@ sparcUseHWMulDiv(void) */ static int moduleseq = 0; -/* - * GDB Interface - * ============= - * - * Linked list of loaded modules - gdb will traverse this to determine - * whether it needs to add the symbols for the loaded module. - */ -LDRModulePtr ModList = 0; - -/* Flag which gdb sets to let us know we're being debugged */ -char DebuggerPresent = 0; - -/* List of common symbols */ -LDRCommonPtr ldrCommons; -int nCommons; - typedef struct { int num; const char **list; @@ -253,29 +193,8 @@ static symlist reqList = { 0, NULL }; static int fatalReqSym = 0; /* Prototypes for static functions. */ -static int _GetModuleType(int, long); static loaderPtr _LoaderListPush(void); static loaderPtr _LoaderListPop(int); - /*ARGSUSED*/ static char * -ARCHIVEAddressToSection(void *modptr, unsigned long address) -{ - return NULL; -} - -/* - * Array containing entry points for different formats. - */ - -static loader_funcs funcs[] = { - /* LD_ELFDLOBJECT */ - {DLLoadModule, - DLResolveSymbols, - DLCheckForUnresolved, - ARCHIVEAddressToSection, - DLUnloadModule}, -}; - -int numloaders = sizeof(funcs) / sizeof(loader_funcs); void LoaderInit(void) @@ -287,20 +206,6 @@ LoaderInit(void) xf86Msg(X_ERROR, "LD_BIND_NOW is set, dlloader will NOT work!\n"); } - LoaderAddSymbols(-1, -1, miLookupTab); - LoaderAddSymbols(-1, -1, xfree86LookupTab); - LoaderAddSymbols(-1, -1, dixLookupTab); - LoaderAddSymbols(-1, -1, fontLookupTab); - LoaderAddSymbols(-1, -1, extLookupTab); -#if defined(__sparc__) && !defined(__FreeBSD__) -#ifdef linux - if (sparcUseHWMulDiv()) - LoaderAddSymbols(-1, -1, SparcV89LookupTab); - else -#endif - LoaderAddSymbols(-1, -1, SparcLookupTab); -#endif - xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n"); xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC, GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion), @@ -322,16 +227,6 @@ LoaderInit(void) if (osname) xf86MsgVerb(X_INFO, 2, "Loader running on %s\n", osname); -#if defined(linux) && \ - (defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \ - || ( defined __amd64__ && ! defined UseMMAP && ! defined DoMMAPedMerge)) - /* - * The glibc malloc uses mmap for large allocations anyway. This breaks - * some relocation types because the offset overflow. See loader.h for more - * details. We need to turn off this behavior here. - */ - mallopt(M_MMAP_MAX, 0); -#endif #if defined(__UNIXWARE__) && !defined(__GNUC__) /* For UnixWare we need to load the C Runtime libraries which are * normally auto-linked by the compiler. Otherwise we are bound to @@ -354,25 +249,12 @@ LoaderInit(void) #endif } -/* - * Determine what type of object is being loaded. - * This function is responsible for restoring the offset. - * The fd and offset are used here so that when Archive processing - * is enabled, individual elements of an archive can be evaluated - * so the correct loader_funcs can be determined. - */ -static int -_GetModuleType(int fd, long offset) -{ - return LD_ELFDLOBJECT; -} - static loaderPtr listHead = (loaderPtr) 0; static loaderPtr _LoaderListPush() { - loaderPtr item = xf86loadercalloc(1, sizeof(struct _loader)); + loaderPtr item = calloc(1, sizeof(struct _loader)); item->next = listHead; listHead = item; @@ -494,28 +376,6 @@ _LoaderModuleToName(int module) } /* - * _LoaderAddressToSection() will return the name of the file & section - * that contains the given address. - */ -int -_LoaderAddressToSection(const unsigned long address, const char **module, - const char **section) -{ - loaderPtr item = listHead; - - while (item) { - if ((*section = - item->funcs->AddressToSection(item->private, address)) != NULL) { - *module = _LoaderModuleToName(item->module); - return 1; - } - item = item->next; - } - - return 0; -} - -/* * Add a list of symbols to the referenced list. */ @@ -676,22 +536,15 @@ _LoaderHandleUnresolved(char *symbol, char *module) return (fatalsym); } -/* - * Relocation list manipulation routines - */ - -/* - * Public Interface to the loader. - */ +/* Public Interface to the loader. */ int LoaderOpen(const char *module, const char *cname, int handle, int *errmaj, int *errmin, int *wasLoaded, int flags) { loaderPtr tmp; - int new_handle, modtype; + int new_handle; int fd; - LOOKUP *pLookup; #if defined(DEBUG) ErrorF("LoaderOpen(%s)\n", module); @@ -757,26 +610,15 @@ LoaderOpen(const char *module, const char *cname, int handle, return -1; } - if ((modtype = _GetModuleType(fd, 0)) < 0) { - xf86Msg(X_ERROR, "%s is an unrecognized module type\n", module); - freeHandles[new_handle] = HANDLE_FREE; - if (errmaj) - *errmaj = LDR_UNKTYPE; - if (errmin) - *errmin = LDR_UNKTYPE; - return -1; - } - tmp = _LoaderListPush(); - tmp->name = xf86loadermalloc(strlen(module) + 1); + tmp->name = malloc(strlen(module) + 1); strcpy(tmp->name, module); - tmp->cname = xf86loadermalloc(strlen(cname) + 1); + tmp->cname = malloc(strlen(cname) + 1); strcpy(tmp->cname, cname); tmp->handle = new_handle; tmp->module = moduleseq++; - tmp->funcs = &funcs[modtype]; - if ((tmp->private = funcs[modtype].LoadModule(tmp, fd, &pLookup, flags)) == NULL) { + if ((tmp->private = DLLoadModule(tmp, fd, flags)) == NULL) { xf86Msg(X_ERROR, "Failed to load %s\n", module); _LoaderListPop(new_handle); freeHandles[new_handle] = HANDLE_FREE; @@ -787,11 +629,6 @@ LoaderOpen(const char *module, const char *cname, int handle, return -1; } - if (tmp->private != (void *)-1L) { - LoaderAddSymbols(new_handle, tmp->module, pLookup); - xf86loaderfree(pLookup); - } - close(fd); return new_handle; @@ -813,50 +650,13 @@ LoaderHandleOpen(int handle) _X_EXPORT void * LoaderSymbol(const char *sym) { - int i; - itemPtr item = NULL; - - for (i = 0; i < numloaders; i++) - funcs[i].ResolveSymbols(&funcs[i]); - - item = (itemPtr) LoaderHashFind(sym); - - if (item) - return item->address; - else - return (DLFindSymbol(sym)); -} - -int -LoaderResolveSymbols(void) -{ - int i; - - for (i = 0; i < numloaders; i++) - funcs[i].ResolveSymbols(&funcs[i]); - return 0; + return (DLFindSymbol(sym)); } _X_EXPORT int LoaderCheckUnresolved(int delay_flag) { - int i, ret = 0; - LoaderResolveOptions delayFlag = (LoaderResolveOptions)delay_flag; - - LoaderResolveSymbols(); - - if (delayFlag == LD_RESOLV_NOW) { - if (check_unresolved_sema > 0) - check_unresolved_sema--; - else - xf86Msg(X_WARNING, "LoaderCheckUnresolved: not enough " - "MAGIC_DONT_CHECK_UNRESOLVED\n"); - } - - if (!check_unresolved_sema || delayFlag == LD_RESOLV_FORCE) - for (i = 0; i < numloaders; i++) - if (funcs[i].CheckForUnresolved(&funcs[i])) - ret = 1; + int ret = 0; if (fatalReqSym) FatalError("Some required symbols were unresolved\n"); @@ -864,24 +664,6 @@ LoaderCheckUnresolved(int delay_flag) return ret; } -void xf86LoaderTrap(void); - -void -xf86LoaderTrap(void) -{ -} - -_X_EXPORT void -LoaderDefaultFunc(void) -{ - ErrorF("\n\n\tThis should not happen!\n" - "\tAn unresolved function was called!\n"); - - xf86LoaderTrap(); - - FatalError("\n"); -} - int LoaderUnload(int handle) { @@ -905,10 +687,10 @@ LoaderUnload(int handle) /* It is not a member of an archive */ xf86Msg(X_INFO, "Unloading %s\n", tmp->name); } - tmp->funcs->LoaderUnload(tmp->private); - xf86loaderfree(tmp->name); - xf86loaderfree(tmp->cname); - xf86loaderfree(tmp); + DLUnloadModule(tmp->private); + free(tmp->name); + free(tmp->cname); + free(tmp); } freeHandles[handle] = HANDLE_FREE; @@ -925,12 +707,6 @@ LoaderDuplicateSymbol(const char *symbol, const int handle) FatalError("Module load failure\n"); } -/* GDB Sync function */ -void -_loader_debug_state() -{ -} - unsigned long LoaderOptions = 0; void diff --git a/hw/xfree86/loader/loader.h b/hw/xfree86/loader/loader.h index 193adddda..c0913849d 100644 --- a/hw/xfree86/loader/loader.h +++ b/hw/xfree86/loader/loader.h @@ -1,7 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.h,v 1.28 2003/11/06 18:38:14 tsi Exp $ */ - /* - * * Copyright 1995-1998 by Metro Link, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -56,134 +53,19 @@ #ifndef _LOADER_H #define _LOADER_H -#include "sym.h" - #if defined(Lynx) && defined(sun) #define const /**/ #endif -#if (defined(__i386__) || defined(__ix86)) && !defined(i386) -#define i386 -#endif #include <X11/Xosdefs.h> #include <X11/Xfuncproto.h> #include <X11/Xmd.h> -/* For LOOKUP definition */ -#include "sym.h" -#define LD_UNKNOWN -1 -#define LD_ELFDLOBJECT 0 -#define LD_PROCESSED_ARCHIVE -1 -/* #define UNINIT_SECTION */ -#define HANDLE_IN_HASH_ENTRY /* LoadModule proc flags; LD_FLAG_GLOBAL adds symbols to global * namespace, default is to keep symbols local to module. */ #define LD_FLAG_GLOBAL 1 -#define TestFree(a) if (a) { xfree (a); a = NULL; } -#define HASHDIV 10 -#define HASHSIZE (1<<HASHDIV) - -typedef struct _loader_item *itemPtr; -typedef struct _loader_item { - char *name; - void *address; - itemPtr next; - int handle; - int module; - itemPtr exports; -#if defined(__powerpc__) - /* - * PowerPC file formats require special routines in some circumstances - * to assist in the linking process. See the specific loader for - * more details. - */ - union { - unsigned short plt[8]; /* ELF */ - } code; -#endif -} itemRec; - -/* The following structures provide an interface to GDB (note that GDB - has copies of the definitions - if you change anything here make - sure that the changes are also made to GDB */ - -typedef struct { - char *name; /* Name of this symbol */ - unsigned int namelen; /* Name of this module */ - void *addr; /* Start address of the .text section */ -} LDRCommon, *LDRCommonPtr; - -typedef struct x_LDRModuleRec { - unsigned int version; /* Version of this struct */ - char *name; /* Name of this module */ - unsigned int namelen; /* Length of name */ - void *text; /* Start address of the .text section */ - void *data; /* Start address of the .data section */ - void *rodata; /* Start address of the .rodata section */ - void *bss; /* Start address of the .bss section */ - LDRCommonPtr commons; /* List of commmon symbols */ - int commonslen; /* Number of common symbols */ - struct x_LDRModuleRec *next; /* Next module record in chain */ -} LDRModuleRec, *LDRModulePtr; - -extern char DebuggerPresent; -extern LDRModulePtr ModList; -extern LDRCommonPtr ldrCommons; -extern int nCommons; - -/* - * The loader uses loader specific alloc/calloc/free functions that - * are mapped to either to the regular Xserver functions, or in a couple - * of special cases, mapped to the C library functions. - */ -#if !defined(PowerMAX_OS) && !(defined(linux) && (defined(__alpha__) || defined(__powerpc__) || defined(__ia64__))) && 0 -#define xf86loadermalloc(size) xalloc(size) -#define xf86loaderrealloc(ptr,size) xrealloc(ptr,size) -#define xf86loadercalloc(num,size) xcalloc(num,size) -#define xf86loaderfree(ptr) xfree(ptr) -#define xf86loaderstrdup(ptr) xstrdup(ptr) -#else -/* - * On Some OSes, xalloc() et al uses mmap to allocate space for large - * allocation. This has the effect of placing the text section of some - * modules very far away from the rest which are placed on the heap. - * Certain relocations are limited in the size of the offsets that can be - * handled, and this seperation causes these relocation to overflow. This - * is fixed by just using the C library allocation functions for the loader - * to ensure that all text sections are located on the heap. OSes that have - * this problem are: - * PowerMAX_OS/PPC - * Linux/Alpha - * Linux/PPC - * Linux/IA-64 - */ -#define xf86loadermalloc(size) malloc(size) -#define xf86loaderrealloc(ptr,size) realloc(ptr,size) -#define xf86loadercalloc(num,size) calloc(num,size) -#define xf86loaderfree(ptr) free(ptr) -#define xf86loaderstrdup(ptr) strdup(ptr) -#endif - typedef struct _loader *loaderPtr; -/* - * _loader_funcs hold the entry points for a module format. - */ - -typedef void *(*LoadModuleProcPtr) (loaderPtr modrec, int fd, LOOKUP **, int flags); -typedef void (*ResolveSymbolsProcPtr) (void *); -typedef int (*CheckForUnresolvedProcPtr) (void *); -typedef char *(*AddressToSectionProcPtr) (void *, unsigned long); -typedef void (*LoaderUnloadProcPtr) (void *); - -typedef struct _loader_funcs { - LoadModuleProcPtr LoadModule; - ResolveSymbolsProcPtr ResolveSymbols; - CheckForUnresolvedProcPtr CheckForUnresolved; - AddressToSectionProcPtr AddressToSection; - LoaderUnloadProcPtr LoaderUnload; -} loader_funcs; - /* Each module loaded has a loaderRec */ typedef struct _loader { int handle; /* Unique id used to remove symbols from @@ -192,7 +74,6 @@ typedef struct _loader { char *name; char *cname; void *private; /* format specific data */ - loader_funcs *funcs; /* funcs for operating on this module */ loaderPtr next; } loaderRec; @@ -205,47 +86,22 @@ typedef struct { int extensionVersion; int fontVersion; } ModuleVersions; -extern ModuleVersions LoaderVersionInfo; +extern const ModuleVersions LoaderVersionInfo; extern unsigned long LoaderOptions; /* Internal Functions */ - -void LoaderAddSymbols(int, int, LOOKUP *); -void LoaderDefaultFunc(void); void LoaderDuplicateSymbol(const char *, const int); - -#if 0 -void LoaderFixups(void); -#endif -void LoaderResolve(void); -int LoaderResolveSymbols(void); int _LoaderHandleUnresolved(char *, char *); -void LoaderHashAdd(itemPtr); -itemPtr LoaderHashDelete(const char *); -itemPtr LoaderHashFind(const char *); -void LoaderHashTraverse(void *, int (*)(void *, itemPtr)); -void LoaderPrintAddress(const char *); -void LoaderPrintItem(itemPtr); -void LoaderPrintSymbol(unsigned long); -void LoaderDumpSymbols(void); char *_LoaderModuleToName(int); -int _LoaderAddressToSection(const unsigned long, const char **, - const char **); int LoaderOpen(const char *, const char *, int, int *, int *, int *, int); int LoaderHandleOpen(int); -/* - * object to name lookup routines - */ +/* object to name lookup routines */ char *_LoaderHandleToName(int handle); char *_LoaderHandleToCanonicalName(int handle); -/* - * Entry points for the different loader types - */ +/* Loader backends. */ #include "dlloader.h" -extern void _loader_debug_state(void); - #endif /* _LOADER_H */ diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h index 12b5b9974..0e77e6b3a 100644 --- a/hw/xfree86/loader/loaderProcs.h +++ b/hw/xfree86/loader/loaderProcs.h @@ -1,7 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loaderProcs.h,v 1.21 2003/10/15 16:29:04 dawes Exp $ */ - /* - * * Copyright 1995-1998 by Metro Link, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -79,9 +76,7 @@ typedef struct module_desc { const XF86ModuleVersionInfo *VersionInfo; } ModuleDesc, *ModuleDescPtr; -/* - * Extenal API for the loader - */ +/* External API for the loader */ void LoaderInit(void); diff --git a/hw/xfree86/loader/loadext.c b/hw/xfree86/loader/loadext.c index 787538fd4..b7523289c 100644 --- a/hw/xfree86/loader/loadext.c +++ b/hw/xfree86/loader/loadext.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadext.c,v 1.8 2003/10/15 16:29:04 dawes Exp $ */ /* * Copyright (c) 2000 by The XFree86 Project, Inc. * @@ -37,6 +36,10 @@ #include "misc.h" #include "xf86.h" +/* + * This should be static, but miinitext wants it. FIXME: make extension + * initialization not completely terrible. + */ ExtensionModule *ExtensionModuleList = NULL; static int numExtensionModules = 0; diff --git a/hw/xfree86/loader/loadfont.c b/hw/xfree86/loader/loadfont.c index ba5b6fb43..94d31d6c1 100644 --- a/hw/xfree86/loader/loadfont.c +++ b/hw/xfree86/loader/loadfont.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadfont.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */ /* * Copyright (c) 1998 by The XFree86 Project, Inc. * @@ -37,6 +36,7 @@ #include "misc.h" #include "xf86.h" +/* XXX this should be static, but xorgcfg needs it, nngh */ FontModule *FontModuleList = NULL; static int numFontModules = 0; diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index cf6751b70..fd84a924c 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -1,7 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadmod.c,v 1.73 2003/11/03 05:11:51 tsi Exp $ */ - /* - * * Copyright 1995-1998 by Metro Link, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -73,7 +70,7 @@ #include <dirent.h> #include <limits.h> -extern int check_unresolved_sema; +#define TestFree(a) if (a) { xfree (a); a = NULL; } typedef struct _pattern { const char *pattern; @@ -93,7 +90,7 @@ static ModuleDescPtr doLoadModule(const char *, const char *, const char **, const XF86ModReqInfo *, int *, int *, int flags); -ModuleVersions LoaderVersionInfo = { +const ModuleVersions LoaderVersionInfo = { XORG_VERSION_CURRENT, ABI_ANSIC_VERSION, ABI_VIDEODRV_VERSION, @@ -102,17 +99,6 @@ ModuleVersions LoaderVersionInfo = { ABI_FONT_VERSION }; -#if 0 -void -LoaderFixups(void) -{ - /* Need to call LRS here because the frame buffers get loaded last, - * and the drivers depend on them. */ - - LoaderResolveSymbols(); -} -#endif - static void FreeStringList(char **paths) { @@ -225,15 +211,15 @@ static const char *stdSubdirs[] = { /* * Standard set of module name patterns to check, in order of preference * These are regular expressions (suitable for use with POSIX regex(3)). + * + * This list assumes that you're an ELFish platform and therefore your + * shared libraries are named something.so. If we're ever nuts enough + * to port this DDX to, say, Darwin, we'll need to fix this. */ static PatternRec stdPatterns[] = { {"^lib(.*)\\.so$",}, - {"^lib(.*)\\.a$",}, {"(.*)_drv\\.so$",}, - {"(.*)_drv\\.o$",}, {"(.*)\\.so$",}, - {"(.*)\\.a$",}, - {"(.*)\\.o$",}, {NULL,} }; @@ -432,7 +418,6 @@ FindModule(const char *module, const char *dir, const char **subdirlist, continue; strcpy(buf, dirpath); strcat(buf, *s); - /*xf86Msg(X_INFO,"OS2DIAG: FindModule: buf=%s\n",buf); */ if ((stat(buf, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) { if (buf[dirlen - 1] != '/') { buf[dirlen++] = '/'; @@ -728,19 +713,11 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data, /* XXX Maybe this should be the other way around? */ if (min > reqmin) { xf86MsgVerb(X_WARNING, 2, "module ABI minor version (%d) " - "is new than that available (%d)\n", min, reqmin); + "is newer than that available (%d)\n", min, reqmin); return FALSE; } } } -#ifdef NOTYET - if (data->checksum) { - /* verify the checksum field */ - /* TO BE DONE */ - } else { - ErrorF("\t*** Checksum field is 0 - this module is untrusted!\n"); - } -#endif return TRUE; } @@ -867,7 +844,6 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, int noncanonical = 0; char *m = NULL; - /*xf86Msg(X_INFO,"OS2DIAG: LoadModule: %s\n",module); */ xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module); patterns = InitPatterns(patternlist); @@ -1306,7 +1282,7 @@ LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin) msg = "module-specific error"; break; default: - msg = "uknown error"; + msg = "unknown error"; } if (name) xf86Msg(type, "%s: Failed to load module \"%s\" (%s, %d)\n", diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c deleted file mode 100644 index dc3cb5a85..000000000 --- a/hw/xfree86/loader/misym.c +++ /dev/null @@ -1,225 +0,0 @@ -/* $XdotOrg: xserver/xorg/hw/xfree86/loader/misym.c,v 1.9 2005/10/18 04:02:31 aplattner Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.38 2003/10/15 16:29:04 dawes Exp $ */ - -/* - * - * Copyright 1995,96 by Metro Link, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Metro Link, Inc. not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Metro Link, Inc. makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Copyright (c) 1997-2003 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include "sym.h" -#include "misc.h" -#include "mi.h" -#include "mibank.h" -#include "miwideline.h" -#include "mibstore.h" -#include "cursor.h" -#include "mipointer.h" -#include "migc.h" -#include "miline.h" -#include "mizerarc.h" -#include "mifillarc.h" -#include "micmap.h" -#include "mioverlay.h" -#ifdef PANORAMIX -#include "resource.h" -#include "panoramiX.h" -#endif -#ifdef RENDER -#include "mipict.h" -#endif -#ifdef COMPOSITE -#include "cw.h" -#endif -#ifdef DAMAGE -#include "damage.h" -#endif - -/* mi things */ - -extern miPointerSpriteFuncRec miSpritePointerFuncs; - -LOOKUP miLookupTab[] = { - SYMFUNC(miClearToBackground) - SYMFUNC(miSendGraphicsExpose) - SYMFUNC(miModifyPixmapHeader) - SYMFUNC(miHandleValidateExposures) - SYMFUNC(miSetShape) - SYMFUNC(miChangeBorderWidth) - SYMFUNC(miShapedWindowIn) - SYMFUNC(miRectIn) - SYMFUNC(miZeroClipLine) - SYMFUNC(miZeroDashLine) - SYMFUNC(miClearDrawable) - SYMFUNC(miPolyPoint) - SYMFUNC(miStepDash) - SYMFUNC(miIntersect) - SYMFUNC(miRegionAppend) - SYMFUNC(miRegionCopy) - SYMFUNC(miRegionDestroy) - SYMFUNC(miRegionEmpty) - SYMFUNC(miRegionExtents) - SYMFUNC(miRegionInit) - SYMFUNC(miRegionNotEmpty) - SYMFUNC(miRegionEqual) - SYMFUNC(miRegionReset) - SYMFUNC(miRegionUninit) - SYMFUNC(miRegionValidate) - SYMFUNC(miTranslateRegion) - SYMFUNC(miHandleExposures) - SYMFUNC(miPolyFillRect) - SYMFUNC(miPolyFillArc) - SYMFUNC(miImageGlyphBlt) - SYMFUNC(miPolyGlyphBlt) - SYMFUNC(miFillPolygon) - SYMFUNC(miFillConvexPoly) - SYMFUNC(miPolySegment) - SYMFUNC(miZeroLine) - SYMFUNC(miWideLine) - SYMFUNC(miWideDash) - SYMFUNC(miZeroPolyArc) - SYMFUNC(miPolyArc) - SYMFUNC(miCreateGCOps) - SYMFUNC(miDestroyGCOps) - SYMFUNC(miComputeCompositeClip) - SYMFUNC(miChangeGC) - SYMFUNC(miCopyGC) - SYMFUNC(miDestroyGC) - SYMFUNC(miChangeClip) - SYMFUNC(miDestroyClip) - SYMFUNC(miCopyClip) - SYMFUNC(miPolyRectangle) - SYMFUNC(miPolyText8) - SYMFUNC(miPolyText16) - SYMFUNC(miImageText8) - SYMFUNC(miImageText16) - SYMFUNC(miRegionCreate) - SYMFUNC(miPaintWindow) - SYMFUNC(miZeroArcSetup) - SYMFUNC(miFillArcSetup) - SYMFUNC(miFillArcSliceSetup) - SYMFUNC(miFindMaxBand) - SYMFUNC(miClipSpans) - SYMFUNC(miAllocateGCPrivateIndex) - SYMFUNC(miScreenInit) - SYMFUNC(miGetScreenPixmap) - SYMFUNC(miSetScreenPixmap) - SYMFUNC(miPointerCurrentScreen) - SYMFUNC(miRectAlloc) - SYMFUNC(miInitializeBackingStore) - SYMFUNC(miInitializeBanking) - SYMFUNC(miModifyBanking) - SYMFUNC(miCopyPlane) - SYMFUNC(miCopyArea) - SYMFUNC(miCreateScreenResources) - SYMFUNC(miGetImage) - SYMFUNC(miPutImage) - SYMFUNC(miPushPixels) - SYMFUNC(miPointerInitialize) - SYMFUNC(miPointerPosition) - SYMFUNC(miRecolorCursor) - SYMFUNC(miPointerWarpCursor) - SYMFUNC(miDCInitialize) - SYMFUNC(miRectsToRegion) - SYMFUNC(miPointInRegion) - SYMFUNC(miInverse) - SYMFUNC(miSubtract) - SYMFUNC(miUnion) - SYMFUNC(miPolyBuildEdge) - SYMFUNC(miPolyBuildPoly) - SYMFUNC(miRoundJoinClip) - SYMFUNC(miRoundCapClip) - SYMFUNC(miSetZeroLineBias) - SYMFUNC(miResolveColor) - SYMFUNC(miInitializeColormap) - SYMFUNC(miInstallColormap) - SYMFUNC(miUninstallColormap) - SYMFUNC(miListInstalledColormaps) - SYMFUNC(miExpandDirectColors) - SYMFUNC(miCreateDefColormap) - SYMFUNC(miClearVisualTypes) - SYMFUNC(miSetVisualTypes) - SYMFUNC(miSetVisualTypesAndMasks) - SYMFUNC(miGetDefaultVisualMask) - SYMFUNC(miSetPixmapDepths) - SYMFUNC(miInitVisuals) - SYMFUNC(miWindowExposures) - SYMFUNC(miSegregateChildren) - SYMFUNC(miHookInitVisuals) - SYMFUNC(miPointerAbsoluteCursor) - SYMFUNC(miPointerGetMotionEvents) - SYMFUNC(miPointerGetMotionBufferSize) - SYMFUNC(miOverlayCopyUnderlay) - SYMFUNC(miOverlaySetTransFunction) - SYMFUNC(miOverlayCollectUnderlayRegions) - SYMFUNC(miInitOverlay) - SYMFUNC(miOverlayComputeCompositeClip) - SYMFUNC(miOverlayGetPrivateClips) - SYMFUNC(miOverlaySetRootClip) - SYMVAR(miEmptyBox) - SYMVAR(miEmptyData) - SYMVAR(miZeroLineScreenIndex) - SYMVAR(miSpritePointerFuncs) - SYMVAR(miPointerScreenIndex) - SYMVAR(miInstalledMaps) - SYMVAR(miInitVisualsProc) -#ifdef RENDER - SYMFUNC(miGlyphExtents) -#endif -#ifdef COMPOSITE - SYMFUNC(miDisableCompositeWrapper) -#endif -#ifdef DAMAGE - SYMFUNC(DamageDamageRegion) -#endif - - {0, 0} -}; diff --git a/hw/xfree86/loader/os.c b/hw/xfree86/loader/os.c index 4274200c3..42ab0bc70 100644 --- a/hw/xfree86/loader/os.c +++ b/hw/xfree86/loader/os.c @@ -1,5 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */ - /* * Copyright (c) 1999-2002 by The XFree86 Project, Inc. * @@ -38,6 +36,7 @@ * loader and by OS-specific modules. */ +#ifndef OSNAME #if defined(__linux__) #define OSNAME "linux" #elif defined(__FreeBSD__) @@ -67,6 +66,7 @@ #else #define OSNAME "unknown" #endif +#endif /* Return the OS name, and run-time OS version */ diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c deleted file mode 100644 index 32fe012ad..000000000 --- a/hw/xfree86/loader/xf86sym.c +++ /dev/null @@ -1,1183 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.242 2003/10/27 20:51:16 herrb Exp $ */ - -/* - * - * Copyright 1995,96 by Metro Link, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Metro Link, Inc. not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Metro Link, Inc. makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * Copyright (c) 1997-2003 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -#define INCLUDE_DEPRECATED 1 - -#ifdef HAVE_XORG_CONFIG_H -#include <xorg-config.h> -#endif - -#include <fcntl.h> -#include <setjmp.h> -#include "sym.h" -#include "misc.h" -#include "mi.h" -#include "cursor.h" -#include "mipointer.h" -#include "loaderProcs.h" -#include "xf86Pci.h" -#include "xf86.h" -#include "xf86Resources.h" -#include "xf86_OSproc.h" -#include "xf86Parser.h" -#include "xf86Config.h" -#ifdef XINPUT -# include "xf86Xinput.h" -#endif -#include "xf86OSmouse.h" -#include "xf86OSKbd.h" -#include "xf86xv.h" -#include "xf86xvmc.h" -#include "xf86cmap.h" -#include "xf86fbman.h" -#include "dgaproc.h" -#ifdef DPMSExtension -#include "dpmsproc.h" -#endif -#include "vidmodeproc.h" -#include "xf86miscproc.h" -#include "loader.h" -#define DONT_DEFINE_WRAPPERS -#include "xf86_ansic.h" -#include "xisb.h" -#include "vbe.h" -#ifndef __OpenBSD__ -#include "xf86sbusBus.h" -#endif -#include "compiler.h" - -#ifndef HAS_GLIBC_SIGSETJMP -#if defined(setjmp) && defined(__GNU_LIBRARY__) && \ - (!defined(__GLIBC__) || (__GLIBC__ < 2) || \ - ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 3))) -#define HAS_GLIBC_SIGSETJMP 1 -#endif -#endif - -#if defined(__alpha__) -# ifdef linux -extern unsigned long _bus_base(void); -extern void _outb(char val, unsigned short port); -extern void _outw(short val, unsigned short port); -extern void _outl(int val, unsigned short port); -extern unsigned int _inb(unsigned short port); -extern unsigned int _inw(unsigned short port); -extern unsigned int _inl(unsigned short port); -# endif - -# ifdef __FreeBSD__ -# include <sys/types.h> -extern void outb(u_int32_t port, u_int8_t val); -extern void outw(u_int32_t port, u_int16_t val); -extern void outl(u_int32_t port, u_int32_t val); -extern u_int8_t inb(u_int32_t port); -extern u_int16_t inw(u_int32_t port); -extern u_int32_t inl(u_int32_t port); -# endif - -extern void *__divl(long, long); -extern void *__reml(long, long); -extern void *__divlu(long, long); -extern void *__remlu(long, long); -extern void *__divq(long, long); -extern void *__divqu(long, long); -extern void *__remq(long, long); -extern void *__remqu(long, long); -#endif - -#if defined(__sparc__) && defined(__FreeBSD__) -extern float _Qp_qtos(unsigned int *); -extern double _Qp_qtod(unsigned int *); -extern unsigned long long _Qp_qtoux(unsigned int *); -extern void _Qp_dtoq(unsigned int *, double); -extern void _Qp_uitoq(unsigned int *, unsigned int); -#endif - -#if defined(__GNUC__) -#ifndef __UNIXOS2__ -extern long __div64(long, long); -#endif -extern long __divdf3(long, long); -extern long __divdi3(long, long); -extern long __divsf3(long, long); -extern long __divsi3(long, long); -extern long __moddi3(long, long); -extern long __modsi3(long, long); - -#ifndef __UNIXOS2__ -extern long __mul64(long, long); -#endif -extern long __muldf3(long, long); -extern long __muldi3(long, long); -extern long __mulsf3(long, long); -extern long __mulsi3(long, long); -extern long __udivdi3(long, long); -extern long __udivsi3(long, long); -extern long __umoddi3(long, long); -extern long __umodsi3(long, long); - -#ifndef __UNIXOS2__ -#pragma weak __div64 -#endif -#pragma weak __divdf3 -#pragma weak __divdi3 -#pragma weak __divsf3 -#pragma weak __divsi3 -#pragma weak __moddi3 -#pragma weak __modsi3 -#ifndef __UNIXOS2__ -#pragma weak __mul64 -#endif -#pragma weak __muldf3 -#pragma weak __muldi3 -#pragma weak __mulsf3 -#pragma weak __mulsi3 -#pragma weak __udivdi3 -#pragma weak __udivsi3 -#pragma weak __umoddi3 -#pragma weak __umodsi3 -#endif - -#if defined(__arm__) && defined(__linux__) -#include <sys/io.h> -#endif - -#if defined(__powerpc__) && (defined(Lynx) || defined(linux)) -void _restf14(); -void _restf17(); -void _restf18(); -void _restf19(); -void _restf20(); -void _restf22(); -void _restf23(); -void _restf24(); -void _restf25(); -void _restf26(); -void _restf27(); -void _restf28(); -void _restf29(); -void _savef14(); -void _savef17(); -void _savef18(); -void _savef19(); -void _savef20(); -void _savef22(); -void _savef23(); -void _savef24(); -void _savef25(); -void _savef26(); -void _savef27(); -void _savef28(); -void _savef29(); - -/* even if we compile without -DNO_INLINE we still provide - * the usual port i/o functions for module use - */ - -extern volatile unsigned char *ioBase; - -/* XXX Should get all of these from elsewhere */ -#ifndef linux -extern void outb(IOADDRESS, unsigned char); -extern void outw(IOADDRESS, unsigned short); -extern void outl(IOADDRESS, unsigned int); -extern unsigned int inb(IOADDRESS); -extern unsigned int inw(IOADDRESS); -extern unsigned int inl(IOADDRESS); -#endif -extern void stl_brx(unsigned long, volatile unsigned char *, int); -extern void stw_brx(unsigned short, volatile unsigned char *, int); -extern unsigned long ldl_brx(volatile unsigned char *, int); -extern unsigned short ldw_brx(volatile unsigned char *, int); -#endif - -/* XFree86 things */ - -LOOKUP xfree86LookupTab[] = { - - /* Public OSlib functions */ - SYMFUNC(xf86ReadBIOS) - SYMFUNC(xf86EnableIO) - SYMFUNC(xf86DisableIO) - SYMFUNC(xf86DisableInterrupts) - SYMFUNC(xf86EnableInterrupts) - SYMFUNC(xf86LinearVidMem) - SYMFUNC(xf86CheckMTRR) - SYMFUNC(xf86MapVidMem) - SYMFUNC(xf86UnMapVidMem) - SYMFUNC(xf86MapReadSideEffects) - SYMFUNC(xf86GetPciDomain) - SYMFUNC(xf86MapDomainMemory) - SYMFUNC(xf86MapDomainIO) - SYMFUNC(xf86ReadDomainMemory) - SYMFUNC(xf86UDelay) - SYMFUNC(xf86IODelay) - SYMFUNC(xf86SlowBcopy) -#ifdef __alpha__ - SYMFUNC(xf86SlowBCopyToBus) - SYMFUNC(xf86SlowBCopyFromBus) -#endif - SYMFUNC(xf86BusToMem) - SYMFUNC(xf86MemToBus) - SYMFUNC(xf86OpenSerial) - SYMFUNC(xf86SetSerial) - SYMFUNC(xf86SetSerialSpeed) - SYMFUNC(xf86ReadSerial) - SYMFUNC(xf86WriteSerial) - SYMFUNC(xf86CloseSerial) - SYMFUNC(xf86GetErrno) - SYMFUNC(xf86WaitForInput) - SYMFUNC(xf86SerialSendBreak) - SYMFUNC(xf86FlushInput) - SYMFUNC(xf86SetSerialModemState) - SYMFUNC(xf86GetSerialModemState) - SYMFUNC(xf86SerialModemSetBits) - SYMFUNC(xf86SerialModemClearBits) - SYMFUNC(xf86LoadKernelModule) - SYMFUNC(xf86OSMouseInit) - SYMFUNC(xf86OSKbdPreInit) - SYMFUNC(xf86AgpGARTSupported) - SYMFUNC(xf86GetAGPInfo) - SYMFUNC(xf86AcquireGART) - SYMFUNC(xf86ReleaseGART) - SYMFUNC(xf86AllocateGARTMemory) - SYMFUNC(xf86DeallocateGARTMemory) - SYMFUNC(xf86BindGARTMemory) - SYMFUNC(xf86UnbindGARTMemory) - SYMFUNC(xf86EnableAGP) - SYMFUNC(xf86SoundKbdBell) - SYMFUNC(xf86GARTCloseScreen) -#ifdef XINPUT - /* XISB routines (Merged from Metrolink tree) */ - SYMFUNC(XisbNew) - SYMFUNC(XisbFree) - SYMFUNC(XisbRead) - SYMFUNC(XisbWrite) - SYMFUNC(XisbTrace) - SYMFUNC(XisbBlockDuration) -#endif - - /* xf86Bus.c */ - SYMFUNC(xf86CheckPciSlot) - SYMFUNC(xf86ClaimPciSlot) - SYMFUNC(xf86GetPciVideoInfo) - SYMFUNC(xf86GetPciEntity) - SYMFUNC(xf86GetPciConfigInfo) - SYMFUNC(xf86SetPciVideo) - SYMFUNC(xf86ClaimIsaSlot) - SYMFUNC(xf86ClaimFbSlot) - SYMFUNC(xf86ClaimNoSlot) - SYMFUNC(xf86ParsePciBusString) - SYMFUNC(xf86ComparePciBusString) - SYMFUNC(xf86FormatPciBusNumber) - SYMFUNC(xf86ParseIsaBusString) - SYMFUNC(xf86EnableAccess) - SYMFUNC(xf86SetCurrentAccess) - SYMFUNC(xf86IsPrimaryPci) - SYMFUNC(xf86IsPrimaryIsa) - SYMFUNC(xf86PrintResList) - SYMFUNC(xf86AddResToList) - SYMFUNC(xf86JoinResLists) - SYMFUNC(xf86DupResList) - SYMFUNC(xf86FreeResList) - SYMFUNC(xf86ClaimFixedResources) - SYMFUNC(xf86AddEntityToScreen) - SYMFUNC(xf86SetEntityInstanceForScreen) - SYMFUNC(xf86RemoveEntityFromScreen) - SYMFUNC(xf86GetEntityInfo) - SYMFUNC(xf86GetNumEntityInstances) - SYMFUNC(xf86GetDevFromEntity) - SYMFUNC(xf86GetPciInfoForEntity) - SYMFUNC(xf86SetEntityFuncs) - SYMFUNC(xf86DeallocateResourcesForEntity) - SYMFUNC(xf86RegisterResources) - SYMFUNC(xf86CheckPciMemBase) - SYMFUNC(xf86SetAccessFuncs) - SYMFUNC(xf86IsEntityPrimary) - SYMFUNC(xf86FixPciResource) - SYMFUNC(xf86SetOperatingState) - SYMFUNC(xf86EnterServerState) - SYMFUNC(xf86GetBlock) - SYMFUNC(xf86GetSparse) - SYMFUNC(xf86ReallocatePciResources) - SYMFUNC(xf86ChkConflict) - SYMFUNC(xf86IsPciDevPresent) - SYMFUNC(xf86FindScreenForEntity) - SYMFUNC(xf86FindPciDeviceVendor) - SYMFUNC(xf86FindPciClass) -#ifdef INCLUDE_DEPRECATED - SYMFUNC(xf86EnablePciBusMaster) -#endif - SYMFUNC(xf86RegisterStateChangeNotificationCallback) - SYMFUNC(xf86DeregisterStateChangeNotificationCallback) - SYMFUNC(xf86NoSharedResources) -#ifdef async - SYMFUNC(xf86QueueAsyncEvent) -#endif - /* Shared Accel Accessor Functions */ - SYMFUNC(xf86GetLastScrnFlag) - SYMFUNC(xf86SetLastScrnFlag) - SYMFUNC(xf86IsEntityShared) - SYMFUNC(xf86SetEntityShared) - SYMFUNC(xf86IsEntitySharable) - SYMFUNC(xf86SetEntitySharable) - SYMFUNC(xf86IsPrimInitDone) - SYMFUNC(xf86SetPrimInitDone) - SYMFUNC(xf86ClearPrimInitDone) - SYMFUNC(xf86AllocateEntityPrivateIndex) - SYMFUNC(xf86GetEntityPrivate) - - /* xf86Configure.c */ - SYMFUNC(xf86AddDeviceToConfigure) - - /* xf86Cursor.c */ - SYMFUNC(xf86GetPointerScreenFuncs) - - /* xf86DGA.c */ - /* For drivers */ - SYMFUNC(DGAInit) - SYMFUNC(DGAReInitModes) - /* For extmod */ - SYMFUNC(DGAAvailable) - SYMFUNC(DGAActive) - SYMFUNC(DGASetMode) - SYMFUNC(DGASetInputMode) - SYMFUNC(DGASelectInput) - SYMFUNC(DGAGetViewportStatus) - SYMFUNC(DGASetViewport) - SYMFUNC(DGAInstallCmap) - SYMFUNC(DGASync) - SYMFUNC(DGAFillRect) - SYMFUNC(DGABlitRect) - SYMFUNC(DGABlitTransRect) - SYMFUNC(DGAGetModes) - SYMFUNC(DGAGetOldDGAMode) - SYMFUNC(DGAGetModeInfo) - SYMFUNC(DGAChangePixmapMode) - SYMFUNC(DGACreateColormap) - SYMFUNC(DGAOpenFramebuffer) - SYMFUNC(DGACloseFramebuffer) - - /* xf86DPMS.c */ - SYMFUNC(xf86DPMSInit) - - /* xf86Events.c */ - SYMFUNC(SetTimeSinceLastInputEvent) - SYMFUNC(xf86AddInputHandler) - SYMFUNC(xf86RemoveInputHandler) - SYMFUNC(xf86DisableInputHandler) - SYMFUNC(xf86EnableInputHandler) - SYMFUNC(xf86AddEnabledDevice) - SYMFUNC(xf86RemoveEnabledDevice) - SYMFUNC(xf86InterceptSignals) - SYMFUNC(xf86InterceptSigIll) - SYMFUNC(xf86EnableVTSwitch) - - /* xf86Helper.c */ - SYMFUNC(xf86AddDriver) - SYMFUNC(xf86AddInputDriver) - SYMFUNC(xf86DeleteDriver) - SYMFUNC(xf86DeleteInput) - SYMFUNC(xf86AllocateInput) - SYMFUNC(xf86AllocateScreen) - SYMFUNC(xf86DeleteScreen) - SYMFUNC(xf86AllocateScrnInfoPrivateIndex) - SYMFUNC(xf86AddPixFormat) - SYMFUNC(xf86SetDepthBpp) - SYMFUNC(xf86PrintDepthBpp) - SYMFUNC(xf86SetWeight) - SYMFUNC(xf86SetDefaultVisual) - SYMFUNC(xf86SetGamma) - SYMFUNC(xf86SetDpi) - SYMFUNC(xf86SetBlackWhitePixels) - SYMFUNC(xf86EnableDisableFBAccess) - SYMFUNC(xf86VDrvMsgVerb) - SYMFUNC(xf86DrvMsgVerb) - SYMFUNC(xf86DrvMsg) - SYMFUNC(xf86MsgVerb) - SYMFUNC(xf86Msg) - SYMFUNC(xf86ErrorFVerb) - SYMFUNC(xf86ErrorF) - SYMFUNC(xf86TokenToString) - SYMFUNC(xf86StringToToken) - SYMFUNC(xf86ShowClocks) - SYMFUNC(xf86PrintChipsets) - SYMFUNC(xf86MatchDevice) - SYMFUNC(xf86MatchPciInstances) - SYMFUNC(xf86MatchIsaInstances) - SYMFUNC(xf86GetVerbosity) - SYMFUNC(xf86GetVisualName) - SYMFUNC(xf86GetPix24) - SYMFUNC(xf86GetDepth) - SYMFUNC(xf86GetWeight) - SYMFUNC(xf86GetGamma) - SYMFUNC(xf86GetFlipPixels) - SYMFUNC(xf86GetServerName) - SYMFUNC(xf86ServerIsExiting) - SYMFUNC(xf86ServerIsOnlyDetecting) - SYMFUNC(xf86ServerIsOnlyProbing) - SYMFUNC(xf86ServerIsResetting) - SYMFUNC(xf86CaughtSignal) - SYMFUNC(xf86GetVidModeAllowNonLocal) - SYMFUNC(xf86GetVidModeEnabled) - SYMFUNC(xf86GetModInDevAllowNonLocal) - SYMFUNC(xf86GetModInDevEnabled) - SYMFUNC(xf86GetAllowMouseOpenFail) - SYMFUNC(xf86CommonSpecialKey) - SYMFUNC(xf86IsPc98) - SYMFUNC(xf86DisableRandR) - SYMFUNC(xf86GetRotation) - SYMFUNC(xf86GetVersion) - SYMFUNC(xf86GetModuleVersion) - SYMFUNC(xf86GetClocks) - SYMFUNC(xf86SetPriority) - SYMFUNC(xf86LoadDrvSubModule) - SYMFUNC(xf86LoadSubModule) - SYMFUNC(xf86LoadOneModule) - SYMFUNC(xf86UnloadSubModule) - SYMFUNC(xf86LoaderCheckSymbol) - SYMFUNC(xf86LoaderRefSymLists) - SYMFUNC(xf86LoaderRefSymbols) - SYMFUNC(xf86LoaderReqSymLists) - SYMFUNC(xf86LoaderReqSymbols) - SYMFUNC(xf86SetBackingStore) - SYMFUNC(xf86SetSilkenMouse) - /* SYMFUNC(xf86NewSerialNumber) */ - SYMFUNC(xf86FindXvOptions) - SYMFUNC(xf86GetOS) - SYMFUNC(xf86ConfigPciEntity) - SYMFUNC(xf86ConfigIsaEntity) - SYMFUNC(xf86ConfigFbEntity) - SYMFUNC(xf86ConfigActivePciEntity) - SYMFUNC(xf86ConfigActiveIsaEntity) - SYMFUNC(xf86ConfigPciEntityInactive) - SYMFUNC(xf86ConfigIsaEntityInactive) - SYMFUNC(xf86IsScreenPrimary) - SYMFUNC(xf86RegisterRootWindowProperty) - SYMFUNC(xf86IsUnblank) - SYMFUNC(xf86AddModuleInfo) - SYMFUNC(xf86DeleteModuleInfo) - -#if defined(__sparc__) && !defined(__OpenBSD__) - /* xf86sbusBus.c */ - SYMFUNC(xf86MatchSbusInstances) - SYMFUNC(xf86GetSbusInfoForEntity) - SYMFUNC(xf86GetEntityForSbusInfo) - SYMFUNC(xf86SbusUseBuiltinMode) - SYMFUNC(xf86MapSbusMem) - SYMFUNC(xf86UnmapSbusMem) - SYMFUNC(xf86SbusHideOsHwCursor) - SYMFUNC(xf86SbusSetOsHwCursorCmap) - SYMFUNC(xf86SbusHandleColormaps) - SYMFUNC(sparcPromInit) - SYMFUNC(sparcPromClose) - SYMFUNC(sparcPromGetProperty) - SYMFUNC(sparcPromGetBool) -#endif - - /* xf86Init.c */ - SYMFUNC(xf86GetPixFormat) - SYMFUNC(xf86GetBppFromDepth) - - /* xf86Mode.c */ - SYMFUNC(xf86GetNearestClock) - SYMFUNC(xf86ModeStatusToString) - SYMFUNC(xf86LookupMode) - SYMFUNC(xf86CheckModeForMonitor) - SYMFUNC(xf86InitialCheckModeForDriver) - SYMFUNC(xf86CheckModeForDriver) - SYMFUNC(xf86ValidateModes) - SYMFUNC(xf86DeleteMode) - SYMFUNC(xf86PruneDriverModes) - SYMFUNC(xf86SetCrtcForModes) - SYMFUNC(xf86PrintModes) - SYMFUNC(xf86ShowClockRanges) - - /* xf86Option.c */ - SYMFUNC(xf86CollectOptions) - SYMFUNC(xf86CollectInputOptions) - /* Merging of XInput stuff */ - SYMFUNC(xf86AddNewOption) - SYMFUNC(xf86NewOption) - SYMFUNC(xf86NextOption) - SYMFUNC(xf86OptionListCreate) - SYMFUNC(xf86OptionListMerge) - SYMFUNC(xf86OptionListFree) - SYMFUNC(xf86OptionName) - SYMFUNC(xf86OptionValue) - SYMFUNC(xf86OptionListReport) - SYMFUNC(xf86SetIntOption) - SYMFUNC(xf86SetRealOption) - SYMFUNC(xf86SetStrOption) - SYMFUNC(xf86SetBoolOption) - SYMFUNC(xf86CheckIntOption) - SYMFUNC(xf86CheckRealOption) - SYMFUNC(xf86CheckStrOption) - SYMFUNC(xf86CheckBoolOption) - SYMFUNC(xf86ReplaceIntOption) - SYMFUNC(xf86ReplaceRealOption) - SYMFUNC(xf86ReplaceStrOption) - SYMFUNC(xf86ReplaceBoolOption) - SYMFUNC(xf86FindOption) - SYMFUNC(xf86FindOptionValue) - SYMFUNC(xf86MarkOptionUsed) - SYMFUNC(xf86MarkOptionUsedByName) - SYMFUNC(xf86CheckIfOptionUsed) - SYMFUNC(xf86CheckIfOptionUsedByName) - SYMFUNC(xf86ShowUnusedOptions) - SYMFUNC(xf86ProcessOptions) - SYMFUNC(xf86TokenToOptinfo) - SYMFUNC(xf86TokenToOptName) - SYMFUNC(xf86IsOptionSet) - SYMFUNC(xf86GetOptValString) - SYMFUNC(xf86GetOptValInteger) - SYMFUNC(xf86GetOptValULong) - SYMFUNC(xf86GetOptValReal) - SYMFUNC(xf86GetOptValFreq) - SYMFUNC(xf86GetOptValBool) - SYMFUNC(xf86ReturnOptValBool) - SYMFUNC(xf86NameCmp) - SYMFUNC(xf86InitValuatorAxisStruct) - SYMFUNC(xf86InitValuatorDefaults) - - /* xf86fbman.c */ - SYMFUNC(xf86InitFBManager) - SYMFUNC(xf86InitFBManagerArea) - SYMFUNC(xf86InitFBManagerRegion) - SYMFUNC(xf86InitFBManagerLinear) - SYMFUNC(xf86RegisterFreeBoxCallback) - SYMFUNC(xf86FreeOffscreenArea) - SYMFUNC(xf86AllocateOffscreenArea) - SYMFUNC(xf86AllocateLinearOffscreenArea) - SYMFUNC(xf86ResizeOffscreenArea) - SYMFUNC(xf86FBManagerRunning) - SYMFUNC(xf86QueryLargestOffscreenArea) - SYMFUNC(xf86PurgeUnlockedOffscreenAreas) - SYMFUNC(xf86RegisterOffscreenManager) - SYMFUNC(xf86AllocateOffscreenLinear) - SYMFUNC(xf86ResizeOffscreenLinear) - SYMFUNC(xf86QueryLargestOffscreenLinear) - SYMFUNC(xf86FreeOffscreenLinear) - - /* xf86cmap.c */ - SYMFUNC(xf86HandleColormaps) - SYMFUNC(xf86GetGammaRampSize) - SYMFUNC(xf86GetGammaRamp) - SYMFUNC(xf86ChangeGammaRamp) - - /* xf86RandR.c */ -#ifdef RANDR - SYMFUNC(xf86RandRSetNewVirtualAndDimensions) -#endif - - /* xf86xv.c */ -#ifdef XV - SYMFUNC(xf86XVScreenInit) - SYMFUNC(xf86XVRegisterGenericAdaptorDriver) - SYMFUNC(xf86XVListGenericAdaptors) - SYMFUNC(xf86XVRegisterOffscreenImages) - SYMFUNC(xf86XVQueryOffscreenImages) - SYMFUNC(xf86XVAllocateVideoAdaptorRec) - SYMFUNC(xf86XVFreeVideoAdaptorRec) - SYMFUNC(xf86XVFillKeyHelper) - SYMFUNC(xf86XVClipVideoHelper) - SYMFUNC(xf86XVCopyYUV12ToPacked) - SYMFUNC(xf86XVCopyPacked) - - /* xf86xvmc.c */ - SYMFUNC(xf86XvMCScreenInit) - SYMFUNC(xf86XvMCCreateAdaptorRec) - SYMFUNC(xf86XvMCDestroyAdaptorRec) -#endif - - /* xf86VidMode.c */ - SYMFUNC(VidModeExtensionInit) -#ifdef XF86VIDMODE - SYMFUNC(VidModeGetCurrentModeline) - SYMFUNC(VidModeGetFirstModeline) - SYMFUNC(VidModeGetNextModeline) - SYMFUNC(VidModeDeleteModeline) - SYMFUNC(VidModeZoomViewport) - SYMFUNC(VidModeGetViewPort) - SYMFUNC(VidModeSetViewPort) - SYMFUNC(VidModeSwitchMode) - SYMFUNC(VidModeLockZoom) - SYMFUNC(VidModeGetMonitor) - SYMFUNC(VidModeGetNumOfClocks) - SYMFUNC(VidModeGetClocks) - SYMFUNC(VidModeCheckModeForMonitor) - SYMFUNC(VidModeCheckModeForDriver) - SYMFUNC(VidModeSetCrtcForMode) - SYMFUNC(VidModeAddModeline) - SYMFUNC(VidModeGetDotClock) - SYMFUNC(VidModeGetNumOfModes) - SYMFUNC(VidModeSetGamma) - SYMFUNC(VidModeGetGamma) - SYMFUNC(VidModeCreateMode) - SYMFUNC(VidModeCopyMode) - SYMFUNC(VidModeGetModeValue) - SYMFUNC(VidModeSetModeValue) - SYMFUNC(VidModeGetMonitorValue) - SYMFUNC(VidModeSetGammaRamp) - SYMFUNC(VidModeGetGammaRamp) - SYMFUNC(VidModeGetGammaRampSize) -#endif - - /* xf86Versions.c */ - SYMFUNC(xf86GetBuiltinInterfaceVersion) - SYMFUNC(xf86RegisterBuiltinInterfaceVersion) - - /* xf86MiscExt.c */ -#ifdef XF86MISC - SYMFUNC(MiscExtGetMouseSettings) - SYMFUNC(MiscExtGetMouseValue) - SYMFUNC(MiscExtSetMouseValue) - SYMFUNC(MiscExtSetMouseDevice) - SYMFUNC(MiscExtGetKbdSettings) - SYMFUNC(MiscExtGetKbdValue) - SYMFUNC(MiscExtSetKbdValue) - SYMFUNC(MiscExtSetGrabKeysState) - SYMFUNC(MiscExtCreateStruct) - SYMFUNC(MiscExtDestroyStruct) - SYMFUNC(MiscExtApply) - SYMFUNC(MiscExtGetFilePaths) - SYMFUNC(MiscExtPassMessage) -#endif - - /* Misc */ - SYMFUNC(GetTimeInMillis) - - /* xf86Xinput.c */ -#ifdef XINPUT - SYMFUNC(xf86ProcessCommonOptions) - SYMFUNC(xf86IsCorePointer) - SYMFUNC(xf86PostMotionEvent) - SYMFUNC(xf86PostProximityEvent) - SYMFUNC(xf86PostButtonEvent) - SYMFUNC(xf86PostKeyEvent) - SYMFUNC(xf86PostKeyboardEvent) - SYMFUNC(xf86GetMotionEvents) - SYMFUNC(xf86MotionHistoryAllocate) - SYMFUNC(xf86FirstLocalDevice) - SYMFUNC(xf86eqEnqueue) - SYMFUNC(xf86ActivateDevice) -/* The following segment merged from Metrolink tree */ - SYMFUNC(xf86XInputSetScreen) - SYMFUNC(xf86ScaleAxis) - SYMFUNC(xf86XInputSetSendCoreEvents) -/* End merged segment */ -#endif -#ifdef DPMSExtension - SYMFUNC(DPMSGet) - SYMFUNC(DPMSSet) - SYMFUNC(DPMSSupported) -#endif -/* xf86Debug.c */ -#ifdef BUILDDEBUG - SYMFUNC(xf86Break1) - SYMFUNC(xf86Break2) - SYMFUNC(xf86Break3) - SYMFUNC(xf86SPTimestamp) - SYMFUNC(xf86STimestamp) -#endif - - SYMFUNC(pciFindFirst) - SYMFUNC(pciFindNext) - SYMFUNC(pciWriteByte) - SYMFUNC(pciWriteWord) - SYMFUNC(pciWriteLong) - SYMFUNC(pciReadByte) - SYMFUNC(pciReadWord) - SYMFUNC(pciReadLong) - SYMFUNC(pciSetBitsLong) - SYMFUNC(pciTag) - SYMFUNC(pciBusAddrToHostAddr) - SYMFUNC(pciHostAddrToBusAddr) - SYMFUNC(xf86MapPciMem) - SYMFUNC(xf86scanpci) - SYMFUNC(xf86ReadPciBIOS) - - /* Loader functions */ - SYMFUNC(LoaderDefaultFunc) - SYMFUNC(LoadSubModule) - SYMFUNC(DuplicateModule) - SYMFUNC(LoaderErrorMsg) - SYMFUNC(LoaderCheckUnresolved) - SYMFUNC(LoadExtension) - SYMFUNC(LoadFont) - SYMFUNC(LoaderReqSymbols) - SYMFUNC(LoaderReqSymLists) - SYMFUNC(LoaderRefSymbols) - SYMFUNC(LoaderRefSymLists) - SYMFUNC(UnloadSubModule) - SYMFUNC(LoaderSymbol) - SYMFUNC(LoaderListDirs) - SYMFUNC(LoaderFreeDirList) - SYMFUNC(LoaderGetOS) - SYMFUNC(LoaderGetABIVersion) - - /* - * These are our own interfaces to libc functions. - */ - SYMFUNC(xf86abort) - SYMFUNC(xf86abs) - SYMFUNC(xf86acos) - SYMFUNC(xf86asin) - SYMFUNC(xf86atan) - SYMFUNC(xf86atan2) - SYMFUNC(xf86atof) - SYMFUNC(xf86atoi) - SYMFUNC(xf86atol) - SYMFUNC(xf86bsearch) - SYMFUNC(xf86ceil) - SYMFUNC(xf86calloc) - SYMFUNC(xf86clearerr) - SYMFUNC(xf86close) - SYMFUNC(xf86cos) - SYMFUNC(xf86exit) - SYMFUNC(xf86exp) - SYMFUNC(xf86fabs) - SYMFUNC(xf86fclose) - SYMFUNC(xf86feof) - SYMFUNC(xf86ferror) - SYMFUNC(xf86fflush) - SYMFUNC(xf86fgetc) - SYMFUNC(xf86fgetpos) - SYMFUNC(xf86fgets) - SYMFUNC(xf86finite) - SYMFUNC(xf86floor) - SYMFUNC(xf86fmod) - SYMFUNC(xf86fopen) - SYMFUNC(xf86fprintf) - SYMFUNC(xf86fputc) - SYMFUNC(xf86fputs) - SYMFUNC(xf86fread) - SYMFUNC(xf86free) - SYMFUNC(xf86freopen) - SYMFUNC(xf86frexp) - SYMFUNC(xf86fscanf) - SYMFUNC(xf86fseek) - SYMFUNC(xf86fsetpos) - SYMFUNC(xf86ftell) - SYMFUNC(xf86fwrite) - SYMFUNC(xf86getc) - SYMFUNC(xf86getenv) - SYMFUNC(xf86getpagesize) - SYMFUNC(xf86hypot) - SYMFUNC(xf86ioctl) - SYMFUNC(xf86isalnum) - SYMFUNC(xf86isalpha) - SYMFUNC(xf86iscntrl) - SYMFUNC(xf86isdigit) - SYMFUNC(xf86isgraph) - SYMFUNC(xf86islower) - SYMFUNC(xf86isprint) - SYMFUNC(xf86ispunct) - SYMFUNC(xf86isspace) - SYMFUNC(xf86isupper) - SYMFUNC(xf86isxdigit) - SYMFUNC(xf86labs) - SYMFUNC(xf86ldexp) - SYMFUNC(xf86log) - SYMFUNC(xf86log10) - SYMFUNC(xf86lseek) - SYMFUNC(xf86malloc) - SYMFUNC(xf86memchr) - SYMFUNC(xf86memcmp) - SYMFUNC(xf86memcpy) - /* - * Some compilers generate calls to memcpy to handle structure copies - * or run-time initializations. - */ - SYMFUNCALIAS("memcpy", xf86memcpy) - SYMFUNC(xf86memset) - /* - * Some compilers generate calls to memset to handle aggregate - * initializations. - */ - SYMFUNCALIAS("memset", xf86memset) - SYMFUNC(xf86memmove) - SYMFUNC(xf86mmap) - SYMFUNC(xf86modf) - SYMFUNC(xf86munmap) - SYMFUNC(xf86open) - SYMFUNC(xf86perror) - SYMFUNC(xf86pow) - SYMFUNC(xf86printf) - SYMFUNC(xf86qsort) - SYMFUNC(xf86read) - SYMFUNC(xf86realloc) - SYMFUNC(xf86remove) - SYMFUNC(xf86rename) - SYMFUNC(xf86rewind) - SYMFUNC(xf86setbuf) - SYMFUNC(xf86setvbuf) - SYMFUNC(xf86sin) - SYMFUNC(xf86snprintf) - SYMFUNC(xf86sprintf) - SYMFUNC(xf86sqrt) - SYMFUNC(xf86sscanf) - SYMFUNC(xf86strcat) - SYMFUNC(xf86strcmp) - SYMFUNC(xf86strcasecmp) - SYMFUNC(xf86strcpy) - SYMFUNC(xf86strcspn) - SYMFUNC(xf86strerror) - SYMFUNC(xf86strlcat) - SYMFUNC(xf86strlcpy) - SYMFUNC(xf86strlen) - SYMFUNC(xf86strncasecmp) - SYMFUNC(xf86strncat) - SYMFUNC(xf86strncmp) - SYMFUNC(xf86strncpy) - SYMFUNC(xf86strpbrk) - SYMFUNC(xf86strchr) - SYMFUNC(xf86strrchr) - SYMFUNC(xf86strspn) - SYMFUNC(xf86strstr) - SYMFUNC(xf86strtod) - SYMFUNC(xf86strtok) - SYMFUNC(xf86strtol) - SYMFUNC(xf86strtoul) - SYMFUNC(xf86tan) - SYMFUNC(xf86tmpfile) - SYMFUNC(xf86tolower) - SYMFUNC(xf86toupper) - SYMFUNC(xf86ungetc) - SYMFUNC(xf86vfprintf) - SYMFUNC(xf86vsnprintf) - SYMFUNC(xf86vsprintf) - SYMFUNC(xf86write) - - /* non-ANSI C functions */ - SYMFUNC(xf86opendir) - SYMFUNC(xf86closedir) - SYMFUNC(xf86readdir) - SYMFUNC(xf86rewinddir) - SYMFUNC(xf86ffs) - SYMFUNC(xf86strdup) - SYMFUNC(xf86bzero) - SYMFUNC(xf86usleep) - SYMFUNC(xf86execl) - - SYMFUNC(xf86getsecs) - SYMFUNC(xf86fpossize) /* for returning sizeof(fpos_t) */ - - /* Some of these were added for DRI support. */ - SYMFUNC(xf86stat) - SYMFUNC(xf86fstat) - SYMFUNC(xf86access) - SYMFUNC(xf86geteuid) - SYMFUNC(xf86getegid) - SYMFUNC(xf86getpid) - SYMFUNC(xf86mknod) - SYMFUNC(xf86chmod) - SYMFUNC(xf86chown) - SYMFUNC(xf86sleep) - SYMFUNC(xf86mkdir) - SYMFUNC(xf86shmget) - SYMFUNC(xf86shmat) - SYMFUNC(xf86shmdt) - SYMFUNC(xf86shmctl) -#ifdef HAS_GLIBC_SIGSETJMP - SYMFUNC(xf86setjmp) - SYMFUNC(xf86setjmp0) -#if defined(__GLIBC__) && (__GLIBC__ >= 2) - SYMFUNCALIAS("xf86setjmp1", __sigsetjmp) -#else - SYMFUNC(xf86setjmp1) /* For libc5 */ -#endif -#else - SYMFUNCALIAS("xf86setjmp", setjmp) - SYMFUNC(xf86setjmp0) - SYMFUNC(xf86setjmp1) -#endif - SYMFUNCALIAS("xf86longjmp", longjmp) - SYMFUNC(xf86getjmptype) - SYMFUNC(xf86setjmp1_arg2) - SYMFUNC(xf86setjmperror) -#ifdef XF86DRI - /* - * These may have more general uses, but for now, they are only used - * by the DRI. Loading them only when the DRI is built may make porting - * (the non-DRI portions of the X server) easier. - */ - SYMFUNC(xf86InstallSIGIOHandler) - SYMFUNC(xf86RemoveSIGIOHandler) -# if defined(__alpha__) && defined(linux) - SYMFUNC(_bus_base) -# endif -#endif - SYMFUNC(xf86BlockSIGIO) - SYMFUNC(xf86UnblockSIGIO) - -#if defined(__alpha__) - SYMFUNC(__divl) - SYMFUNC(__reml) - SYMFUNC(__divlu) - SYMFUNC(__remlu) - SYMFUNC(__divq) - SYMFUNC(__divqu) - SYMFUNC(__remq) - SYMFUNC(__remqu) - -# ifdef linux - SYMFUNC(_outw) - SYMFUNC(_outb) - SYMFUNC(_outl) - SYMFUNC(_inb) - SYMFUNC(_inw) - SYMFUNC(_inl) - SYMFUNC(_alpha_outw) - SYMFUNC(_alpha_outb) - SYMFUNC(_alpha_outl) - SYMFUNC(_alpha_inb) - SYMFUNC(_alpha_inw) - SYMFUNC(_alpha_inl) -# else - SYMFUNC(outw) - SYMFUNC(outb) - SYMFUNC(outl) - SYMFUNC(inb) - SYMFUNC(inw) - SYMFUNC(inl) -# endif - SYMFUNC(xf86ReadMmio32) - SYMFUNC(xf86ReadMmio16) - SYMFUNC(xf86ReadMmio8) - SYMFUNC(xf86WriteMmio32) - SYMFUNC(xf86WriteMmio16) - SYMFUNC(xf86WriteMmio8) - SYMFUNC(xf86WriteMmioNB32) - SYMFUNC(xf86WriteMmioNB16) - SYMFUNC(xf86WriteMmioNB8) -#endif -#if defined(sun) && defined(SVR4) - SYMFUNC(inb) - SYMFUNC(inw) - SYMFUNC(inl) - SYMFUNC(outb) - SYMFUNC(outw) - SYMFUNC(outl) -#endif -#if defined(__powerpc__) && !defined(__OpenBSD__) - SYMFUNC(inb) - SYMFUNC(inw) - SYMFUNC(inl) - SYMFUNC(outb) - SYMFUNC(outw) - SYMFUNC(outl) -# if defined(NO_INLINE) || defined(Lynx) - SYMFUNC(mem_barrier) - SYMFUNC(ldl_u) - SYMFUNC(eieio) - SYMFUNC(ldl_brx) - SYMFUNC(ldw_brx) - SYMFUNC(stl_brx) - SYMFUNC(stw_brx) - SYMFUNC(ldq_u) - SYMFUNC(ldw_u) - SYMFUNC(stl_u) - SYMFUNC(stq_u) - SYMFUNC(stw_u) - SYMFUNC(write_mem_barrier) -# endif -# if defined(Lynx) - SYMFUNC(_restf14) - SYMFUNC(_restf17) - SYMFUNC(_restf18) - SYMFUNC(_restf19) - SYMFUNC(_restf20) - SYMFUNC(_restf22) - SYMFUNC(_restf23) - SYMFUNC(_restf24) - SYMFUNC(_restf25) - SYMFUNC(_restf26) - SYMFUNC(_restf27) - SYMFUNC(_restf28) - SYMFUNC(_restf29) - SYMFUNC(_savef14) - SYMFUNC(_savef17) - SYMFUNC(_savef18) - SYMFUNC(_savef19) - SYMFUNC(_savef20) - SYMFUNC(_savef22) - SYMFUNC(_savef23) - SYMFUNC(_savef24) - SYMFUNC(_savef25) - SYMFUNC(_savef26) - SYMFUNC(_savef27) - SYMFUNC(_savef28) - SYMFUNC(_savef29) -# endif -# if PPCIO_DEBUG - SYMFUNC(debug_inb) - SYMFUNC(debug_inw) - SYMFUNC(debug_inl) - SYMFUNC(debug_outb) - SYMFUNC(debug_outw) - SYMFUNC(debug_outl) -# endif -#endif -#if defined(__GNUC__) -#if !defined(__UNIXOS2__) && !defined(Lynx) - SYMFUNC(__div64) -#endif -#if !defined(Lynx) /* FIXME: test on others than x86 and !3.1.0a/x86 */ - SYMFUNC(__divdf3) -#endif - SYMFUNC(__divdi3) -#if !defined(Lynx) - SYMFUNC(__divsf3) - SYMFUNC(__divsi3) -#endif - SYMFUNC(__moddi3) -#if !defined(Lynx) - SYMFUNC(__modsi3) -#endif -#if !defined(__UNIXOS2__) && !defined(Lynx) - SYMFUNC(__mul64) -#endif -#if !defined(Lynx) - SYMFUNC(__muldf3) -#endif - SYMFUNC(__muldi3) -#if !defined(Lynx) - SYMFUNC(__mulsf3) - SYMFUNC(__mulsi3) - SYMFUNC(__udivdi3) - SYMFUNC(__udivsi3) -#endif - SYMFUNC(__umoddi3) -#if !defined(Lynx) - SYMFUNC(__umodsi3) -#endif -#endif -#if defined(__ia64__) - SYMFUNC(outw) - SYMFUNC(outb) - SYMFUNC(outl) - SYMFUNC(inb) - SYMFUNC(inw) - SYMFUNC(inl) -#endif -#if defined(__arm__) - SYMFUNC(outw) - SYMFUNC(outb) - SYMFUNC(outl) - SYMFUNC(inb) - SYMFUNC(inw) - SYMFUNC(inl) -#endif - -#ifdef __FreeBSD__ -#if defined(__sparc__) - SYMFUNC(_Qp_qtos) - SYMFUNC(_Qp_qtod) - SYMFUNC(_Qp_qtoux) - SYMFUNC(_Qp_uitoq) - SYMFUNC(_Qp_dtoq) -#endif -#endif - - /* Some variables. */ - - SYMVAR(xf86stdin) - SYMVAR(xf86stdout) - SYMVAR(xf86stderr) - SYMVAR(xf86errno) - SYMVAR(xf86HUGE_VAL) - - /* General variables (from xf86.h) */ - SYMVAR(xf86ScreenIndex) - SYMVAR(xf86PixmapIndex) - SYMVAR(xf86Screens) - SYMVAR(byte_reversed) - SYMVAR(xf86inSuspend) - /* debugging variables */ -#ifdef BUILDDEBUG - SYMVAR(xf86p8bit) - SYMVAR(xf86DummyVar1) - SYMVAR(xf86DummyVar2) - SYMVAR(xf86DummyVar3) -#endif - -#ifdef async - SYMVAR(xf86CurrentScreen) -#endif - /* predefined resource lists from xf86Bus.h */ - SYMVAR(resVgaExclusive) - SYMVAR(resVgaShared) - SYMVAR(resVgaMemShared) - SYMVAR(resVgaIoShared) - SYMVAR(resVgaUnusedExclusive) - SYMVAR(resVgaUnusedShared) - SYMVAR(resVgaSparseExclusive) - SYMVAR(resVgaSparseShared) - SYMVAR(res8514Exclusive) - SYMVAR(res8514Shared) - SYMVAR(PciAvoid) - -#if defined(__powerpc__) && (!defined(NO_INLINE) || defined(Lynx)) - SYMVAR(ioBase) -#endif - - /* Globals from xf86Globals.c and xf86Priv.h */ - SYMVAR(xf86ConfigDRI) - - /* Globals from xf86Configure.c */ - SYMVAR(ConfiguredMonitor) - - /* Pci.c */ - SYMVAR(pciNumBuses) - - {0, 0} -}; |