diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 50d3b2a0f..64841ade3 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -2474,44 +2474,25 @@ xf86LoaderCheckSymbol(const char *name) return LoaderSymbol(name) != NULL; } +/* These two are just ABI stubs, they don't do anything in dlloader world */ _X_EXPORT void xf86LoaderReqSymLists(const char **list0, ...) { - va_list ap; - - va_start(ap, list0); - LoaderVReqSymLists(list0, ap); - va_end(ap); } _X_EXPORT void xf86LoaderReqSymbols(const char *sym0, ...) { - va_list ap; - - va_start(ap, sym0); - LoaderVReqSymbols(sym0, ap); - va_end(ap); } _X_EXPORT void xf86LoaderRefSymLists(const char **list0, ...) { - va_list ap; - - va_start(ap, list0); - LoaderVRefSymLists(list0, ap); - va_end(ap); } _X_EXPORT void xf86LoaderRefSymbols(const char *sym0, ...) { - va_list ap; - - va_start(ap, sym0); - LoaderVRefSymbols(sym0, ap); - va_end(ap); } diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c index 564e72e3c..dd64bd56f 100644 --- a/hw/xfree86/ddc/xf86DDC.c +++ b/hw/xfree86/ddc/xf86DDC.c @@ -15,15 +15,6 @@ static const OptionInfoRec *DDCAvailableOptions(void *unused); -const char *i2cSymbols[] = { - "xf86CreateI2CDevRec", - "xf86I2CDevInit", - "xf86I2CWriteRead", - "xf86I2CFindDev", - "xf86DestroyI2CDevRec", - NULL -}; - static MODULESETUPPROTO(ddcSetup); static XF86ModuleVersionInfo ddcVersRec = @@ -58,12 +49,6 @@ ddcSetup(pointer module, pointer opts, int *errmaj, int *errmin) if (!setupDone) { setupDone = TRUE; xf86AddModuleInfo(&DDC, module); - /* - * Tell the loader about symbols from other modules that this module - * might refer to. - */ - LoaderRefSymLists(i2cSymbols, NULL); - } /* * The return value must be non-NULL on success even though there @@ -348,8 +333,6 @@ DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len) unsigned char *R_Buffer; int i; - xf86LoaderReqSymLists(i2cSymbols, NULL); - if (!(dev = xf86I2CFindDev(pBus, 0x00A0))) { dev = xf86CreateI2CDevRec(); dev->DevName = "ddc2"; diff --git a/hw/xfree86/dri/drimodule.c b/hw/xfree86/dri/drimodule.c index 427065d91..331de8287 100644 --- a/hw/xfree86/dri/drimodule.c +++ b/hw/xfree86/dri/drimodule.c @@ -68,32 +68,6 @@ static ExtensionModule XF86DRIExt = NULL }; -static const char *drmSymbols[] = { - "drmAddContextTag", - "drmAddMap", - "drmAuthMagic", - "drmAvailable", - "drmClose", - "drmCreateContext", - "drmCreateDrawable", - "drmDelContextTag", - "drmDestroyContext", - "drmDestroyDrawable", - "drmFreeReservedContextList", - "drmGetContextTag", - "drmGetLock", - "drmGetReservedContextList", - "drmInstallSIGIOHandler", - "drmMap", - "drmOpen", - "drmRemoveSIGIOHandler", - "drmSetBusid", - "drmSetContextFlags", - "drmUnlock", - "drmUnmap", - NULL -}; - _X_EXPORT XF86ModuleData driModuleData = { &VersRec, driSetup, NULL }; static pointer @@ -110,10 +84,7 @@ driSetup(pointer module, pointer opts, int *errmaj, int *errmin) if (!drm) { if (errmaj) *errmaj = LDR_NOSUBENT; - } - else { - LoaderReqSymLists(drmSymbols, NULL); - LoaderRefSymbols("noPanoramiXExtension", NULL); + } else { LoadExtension(&XF86DRIExt, FALSE); } } else { diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index a5c5b2c8e..42a9d3cd3 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -97,22 +97,6 @@ static int refCount[MAX_HANDLE]; */ static int moduleseq = 0; -typedef struct { - int num; - const char **list; -} symlist; - -/* - * List of symbols that may be referenced, and which are allowed to be - * unresolved providing that they don't appear on the "reqired" list. - */ -static symlist refList = { 0, NULL }; - -/* List of symbols that must not be unresolved */ -static symlist reqList = { 0, NULL }; - -static int fatalReqSym = 0; - /* Prototypes for static functions. */ static loaderPtr _LoaderListPush(void); static loaderPtr _LoaderListPop(int); @@ -300,165 +284,25 @@ _LoaderModuleToName(int module) return 0; } -/* - * Add a list of symbols to the referenced list. - */ - -static void -AppendSymbol(symlist * list, const char *sym) -{ - list->list = xnfrealloc(list->list, (list->num + 1) * sizeof(char **)); - /* copy the symbol, since it comes from a module - that can be unloaded later */ - list->list[list->num] = xnfstrdup(sym); - list->num++; -} - -static void -AppendSymList(symlist * list, const char **syms) -{ - while (*syms) { - AppendSymbol(list, *syms); - syms++; - } -} - -static int -SymInList(symlist * list, char *sym) -{ - int i; - - for (i = 0; i < list->num; i++) - if (strcmp(list->list[i], sym) == 0) - return 1; - - return 0; -} - -void -LoaderVRefSymbols(const char *sym0, va_list args) -{ - const char *s; - - if (sym0 == NULL) - return; - - s = sym0; - do { - AppendSymbol(&refList, s); - s = va_arg(args, const char *); - } while (s != NULL); -} - +/* These four are just ABI stubs */ _X_EXPORT void LoaderRefSymbols(const char *sym0, ...) { - va_list ap; - - va_start(ap, sym0); - LoaderVRefSymbols(sym0, ap); - va_end(ap); -} - -void -LoaderVRefSymLists(const char **list0, va_list args) -{ - const char **l; - - if (list0 == NULL) - return; - - l = list0; - do { - AppendSymList(&refList, l); - l = va_arg(args, const char **); - } while (l != NULL); } _X_EXPORT void LoaderRefSymLists(const char **list0, ...) { - va_list ap; - - va_start(ap, list0); - LoaderVRefSymLists(list0, ap); - va_end(ap); -} - -void -LoaderVReqSymLists(const char **list0, va_list args) -{ - const char **l; - - if (list0 == NULL) - return; - - l = list0; - do { - AppendSymList(&reqList, l); - l = va_arg(args, const char **); - } while (l != NULL); } _X_EXPORT void LoaderReqSymLists(const char **list0, ...) { - va_list ap; - - va_start(ap, list0); - LoaderVReqSymLists(list0, ap); - va_end(ap); -} - -void -LoaderVReqSymbols(const char *sym0, va_list args) -{ - const char *s; - - if (sym0 == NULL) - return; - - s = sym0; - do { - AppendSymbol(&reqList, s); - s = va_arg(args, const char *); - } while (s != NULL); } _X_EXPORT void LoaderReqSymbols(const char *sym0, ...) { - va_list ap; - - va_start(ap, sym0); - LoaderVReqSymbols(sym0, ap); - va_end(ap); -} - -/* - * _LoaderHandleUnresolved() decides what to do with an unresolved - * symbol. Symbols that are not on the "referenced" or "required" lists - * get a warning if they are unresolved. Symbols that are on the "required" - * list generate a fatal error if they are unresolved. - */ - -int -_LoaderHandleUnresolved(char *symbol, char *module) -{ - int fatalsym = 0; - - if (xf86ShowUnresolved && !fatalsym) { - if (SymInList(&reqList, symbol)) { - fatalReqSym = 1; - ErrorF("Required symbol %s from module %s is unresolved!\n", - symbol, module); - } - if (!SymInList(&refList, symbol)) { - ErrorF("Symbol %s from module %s is unresolved!\n", - symbol, module); - } - } - return (fatalsym); } /* Public Interface to the loader. */ @@ -578,15 +422,11 @@ LoaderSymbol(const char *sym) return (DLFindSymbol(sym)); } +/* more stub */ _X_EXPORT int LoaderCheckUnresolved(int delay_flag) { - int ret = 0; - - if (fatalReqSym) - FatalError("Some required symbols were unresolved\n"); - - return ret; + return 0; } int diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h index 0e77e6b3a..324fa9e2b 100644 --- a/hw/xfree86/loader/loaderProcs.h +++ b/hw/xfree86/loader/loaderProcs.h @@ -103,11 +103,6 @@ ModuleDescPtr AddSibling(ModuleDescPtr head, ModuleDescPtr new); void LoaderSetPath(const char *path); void LoaderSortExtensions(void); -void LoaderVReqSymLists(const char **, va_list args); -void LoaderVReqSymbols(const char *, va_list args); -void LoaderVRefSymLists(const char **, va_list args); -void LoaderVRefSymbols(const char *, va_list args); - void LoaderShowStack(void); void *LoaderSymbolHandle(const char *, int); int LoaderUnload(int); diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c index c0e983391..3ca985167 100644 --- a/hw/xfree86/vbe/vbe.c +++ b/hw/xfree86/vbe/vbe.c @@ -39,11 +39,6 @@ static unsigned char * vbeReadEDID(vbeInfoPtr pVbe); static Bool vbeProbeDDC(vbeInfoPtr pVbe); -const char *vbe_ddcSymbols[] = { - "xf86InterpretEDID", - NULL -}; - static const char vbeVersionString[] = "VBE2"; vbeInfoPtr @@ -327,8 +322,6 @@ vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule) xf86LoadSubModule(xf86Screens[pVbe->pInt10->scrnIndex], "ddc"); if (!pModule) return NULL; - - xf86LoaderReqSymLists(vbe_ddcSymbols, NULL); } DDC_data = vbeReadEDID(pVbe); diff --git a/hw/xfree86/vbe/vbe_module.c b/hw/xfree86/vbe/vbe_module.c index 7c7d87660..cf37ef951 100644 --- a/hw/xfree86/vbe/vbe_module.c +++ b/hw/xfree86/vbe/vbe_module.c @@ -6,8 +6,6 @@ #include "xf86str.h" #include "vbe.h" -extern const char *vbe_ddcSymbols[]; - static MODULESETUPPROTO(vbeSetup); static XF86ModuleVersionInfo vbeVersRec = @@ -29,19 +27,5 @@ _X_EXPORT XF86ModuleData vbeModuleData = { &vbeVersRec, vbeSetup, NULL }; static pointer vbeSetup(pointer module, pointer opts, int *errmaj, int *errmin) { - static Bool setupDone = FALSE; - - if (!setupDone) { - setupDone = TRUE; - LoaderRefSymLists(vbe_ddcSymbols,NULL); - /* - * Tell the loader about symbols from other modules that this module - * might refer to. - */ - } - /* - * The return value must be non-NULL on success even though there - * is no TearDownProc. - */ return (pointer)1; }