X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Finterpreter%2Fstorage.c;h=401168f0c7db026e0a87a7484a7e18cfb3705a00;hb=9cb1bb00b6b7ab1d47949b3123624f6d053c393a;hp=06037e4905ccfb2792ebc3b1b07f6634f01f1b25;hpb=61caae387027076b1723fd0c2e6cdddf545def47;p=ghc-hetmet.git diff --git a/ghc/interpreter/storage.c b/ghc/interpreter/storage.c index 06037e4..401168f 100644 --- a/ghc/interpreter/storage.c +++ b/ghc/interpreter/storage.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: storage.c,v $ - * $Revision: 1.67 $ - * $Date: 2000/04/07 09:58:34 $ + * $Revision: 1.68 $ + * $Date: 2000/04/07 16:25:19 $ * ------------------------------------------------------------------------*/ #include "hugsbasictypes.h" @@ -1828,6 +1828,31 @@ void* lookupOExtraTabName ( char* sym ) } +/* Only call this if in dire straits; searches every object symtab + in the system -- so is therefore slow. +*/ +void* lookupOTabNameAbsolutelyEverywhere ( char* sym ) +{ + ObjectCode* oc; + Module m; + void* ad; + for (m = MODULE_BASE_ADDR; + m < MODULE_BASE_ADDR+tabModuleSz; m++) { + if (tabModule[m-MODULE_BASE_ADDR].inUse) { + if (module(m).object) { + ad = ocLookupSym ( module(m).object, sym ); + if (ad) return ad; + } + for (oc = module(m).objectExtras; oc; oc=oc->next) { + ad = ocLookupSym ( oc, sym ); + if (ad) return ad; + } + } + } + return NULL; +} + + OSectionKind lookupSection ( void* ad ) { int i;