Changeset 2870
- Timestamp:
- Nov 12, 2006, 6:38:28 AM (19 years ago)
- Location:
- trunk/kLdr
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/kLdr.h
r2868 r2870 848 848 * If not specified, the symbols are local and can only be referenced directly. */ 849 849 #define KLDRYDLD_LOAD_FLAGS_GLOBAL_SYMBOLS 0x00000001 850 /** The symbols in the module should be loaded into the global unix namespace and 851 * it's symbols should take precedence over all currently loaded modules. 852 * This implies KLDRYDLD_LOAD_FLAGS_GLOBAL_SYMBOLS. */ 853 #define KLDRYDLD_LOAD_FLAGS_DEEP_SYMBOLS 0x00000002 850 854 /** The module shouldn't be found by a global module search. 851 855 * If not specified, the module can be found by unspecified module searches, 852 856 * typical used when loading import/dep modules. */ 853 #define KLDRYDLD_LOAD_FLAGS_SPECIFIC_MODULE 0x0000000 2857 #define KLDRYDLD_LOAD_FLAGS_SPECIFIC_MODULE 0x00000004 854 858 /** Do a recursive initialization calls instead of defering them to the outermost call. */ 855 #define KLDRDYLD_LOAD_FLAGS_RECURSIVE_INIT 0x0000000 4859 #define KLDRDYLD_LOAD_FLAGS_RECURSIVE_INIT 0x00000008 856 860 /** We're loading the executable module. 857 861 * @internal */ … … 1027 1031 /** The file reader can't take more concurrent mappings. */ 1028 1032 #define KLDR_ERR_TOO_MANY_MAPPINGS (KLDR_ERR_BASE + 58) 1033 /** The module wasn't a DLL or object file. */ 1034 #define KLDR_ERR_NOT_DLL (KLDR_ERR_BASE + 59) 1035 /** The module wasn't an EXE. */ 1036 #define KLDR_ERR_NOT_EXE (KLDR_ERR_BASE + 60) 1029 1037 1030 1038 1031 1039 /** @name kLdrModPE status codes 1032 1040 * @{ */ 1033 #define KLDR_ERR_BASE_PE (KLDR_ERR_BASE + 59)1041 #define KLDR_ERR_BASE_PE (KLDR_ERR_BASE + 61) 1034 1042 /** The machine isn't supported by the interpreter. */ 1035 1043 #define KLDR_ERR_PE_UNSUPPORTED_MACHINE (KLDR_ERR_BASE_PE + 0) -
trunk/kLdr/kLdrDyld.c
r2869 r2870 326 326 kldrDyldDoModuleTerminationAndGarabageCollection(); 327 327 kldrHlpSemRelease(); 328 *phMod = pMod ;328 *phMod = pMod ? pMod->hMod : NIL_HKLDRMOD; 329 329 } 330 330 return rc; … … 389 389 { 390 390 PKLDRDYLDMOD pMod = NULL; 391 rc = kldrDyldDoFindByName(pszDll, pszPrefix, pszSuffix, enmSearch, fFlags, phMod);391 rc = kldrDyldDoFindByName(pszDll, pszPrefix, pszSuffix, enmSearch, fFlags, &pMod); 392 392 kldrHlpSemRelease(); 393 *phMod = pMod ;393 *phMod = pMod ? pMod->hMod : NIL_HKLDRMOD; 394 394 } 395 395 return rc; … … 428 428 rc = kldrDyldDoFindByAddress(Address, &pMod, piSegment, poffSegment); 429 429 kldrHlpSemRelease(); 430 *phMod = pMod ;430 *phMod = pMod ? pMod->hMod : NIL_HKLDRMOD; 431 431 } 432 432 return rc; -
trunk/kLdr/kLdrDyldFind.c
r2869 r2870 854 854 const unsigned fNameHasSuffix = pszNameSuffix 855 855 && kLdrHlpStrLen(pszNameSuffix) == cchSuffix 856 && kLdrHlpMemIComp(pszNameSuffix, pszName + cchName - cchSuffix, cchSuffix);856 && !kLdrHlpMemIComp(pszNameSuffix, pszName + cchName - cchSuffix, cchSuffix); 857 857 for (; pCur; pCur = pCur->Load.pNext) 858 858 { -
trunk/kLdr/kLdrDyldMod.c
r2869 r2870 83 83 if (rc) 84 84 return kldrDyldFailure(rc, "%s: %rc", kLdrRdrName(pRdr), rc); 85 86 /* 87 * Match the module aginst the load flags. 88 */ 89 switch (pRawMod->enmType) 90 { 91 case KLDRTYPE_EXECUTABLE_FIXED: 92 case KLDRTYPE_EXECUTABLE_RELOCATABLE: 93 case KLDRTYPE_EXECUTABLE_PIC: 94 if (!(fFlags & KLDRDYLD_LOAD_FLAGS_EXECUTABLE)) 95 { 96 kLdrModClose(pRawMod); 97 return KLDR_ERR_NOT_EXE; 98 } 99 break; 100 101 case KLDRTYPE_OBJECT: /* We can handle these as DLLs. */ 102 case KLDRTYPE_SHARED_LIBRARY_FIXED: 103 case KLDRTYPE_SHARED_LIBRARY_RELOCATABLE: 104 case KLDRTYPE_SHARED_LIBRARY_PIC: 105 case KLDRTYPE_FORWARDER_DLL: 106 if (fFlags & KLDRDYLD_LOAD_FLAGS_EXECUTABLE) 107 { 108 kLdrModClose(pRawMod); 109 return KLDR_ERR_NOT_DLL; 110 } 111 break; 112 113 default: 114 KLDRDYLDMOD_ASSERT(!"Bad enmType!"); 115 case KLDRTYPE_CORE: 116 return fFlags & KLDRDYLD_LOAD_FLAGS_EXECUTABLE ? KLDR_ERR_NOT_EXE : KLDR_ERR_NOT_DLL; 117 } 85 118 86 119 /* … … 128 161 kLdrDyldTail = pMod; 129 162 130 /* we're good. */ 163 /* deal with the remaining flags. */ 164 if (fFlags & KLDRYDLD_LOAD_FLAGS_SPECIFIC_MODULE) 165 kldrDyldModMarkSpecific(pMod); 166 else 167 kldrDyldModMarkGlobal(pMod); 168 169 if (fFlags & KLDRYDLD_LOAD_FLAGS_GLOBAL_SYMBOLS) 170 kldrDyldModSetBindable(pMod, 0 /* not deep binable */); 171 else 172 kldrDyldModClearBindable(pMod); 173 174 /* 175 * We're good. 176 */ 131 177 *ppMod = pMod; 132 178 rc = 0; -
trunk/kLdr/testcase/Makefile.kmk
r2864 r2870 50 50 ## @todo this is a kBuild bug! 51 51 TEMPLATE_TST_LIBS = \ 52 $$(PATH_TOOL_VCC70_LIB)/oldnames.lib \ 52 53 $$(PATH_TOOL_VCC70_LIB)/msvcrt.lib 53 54 else -
trunk/kLdr/testcase/tst-0-driver.c
r2869 r2870 30 30 *******************************************************************************/ 31 31 #include <kLdr.h> 32 #include "tst.h" 32 33 #include <stdarg.h> 33 34 #include <stdio.h> … … 35 36 #include <string.h> 36 37 38 39 /******************************************************************************* 40 * Defined Constants And Macros * 41 *******************************************************************************/ 42 /** Select the appropriate KLDRSYMKIND bit define. */ 43 #define MY_KLDRSYMKIND_BITS ( sizeof(void *) == 4 ? KLDRSYMKIND_32BIT : KLDRSYMKIND_64BIT ) 37 44 38 45 … … 67 74 const char *pszErrInit = "Error, szErr wasn't zapped"; 68 75 char szErr[512]; 76 char szBuf[512]; 77 char *psz; 78 size_t cch; 69 79 HKLDRMOD hMod; 70 80 int rc; 71 81 82 /* 83 * The first thing to do is a simple load / unload test 84 * using the tst-0-a library (it'll drag in tst-0-d). 85 */ 86 printf("tst-0-driver: Basic API test using 'tst-0-a'...\n"); 72 87 hMod = (HKLDRMOD)0xffffeeee; 73 88 strcpy(szErr, pszErrInit); … … 84 99 if (!rc) 85 100 { 101 HKLDRMOD hMod2; 102 HKLDRMOD hMod3; 103 printf("tst-0-driver: hMod=%p ('tst-0-a')\n", (void *)hMod); 104 105 /* 106 * Simple test of kLdrDyldFindByName. 107 */ 108 hMod2 = (HKLDRMOD)0xffffeeee; 109 rc = kLdrDyldFindByName("tst-0", NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod2); 110 if (!rc) 111 Failure("kLdrDyldFindByName(\"tst-0\",,,) didn't fail!\n"); 112 if (rc && hMod2 != NIL_HKLDRMOD) 113 Failure("hMod2 wasn't set correctly on kLdrDyldFindByName failure!\n"); 114 115 hMod2 = (HKLDRMOD)0xffffeeee; 116 rc = kLdrDyldFindByName("tst-0-a", NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod2); 117 if (rc) 118 Failure("kLdrDyldFindByName(\"tst-0-a\",,,) failed, rc=%d (%#x)\n", rc, rc); 119 if (!rc && hMod2 != hMod) 120 Failure("kLdrDyldFindByName(\"tst-0-a\",,,) returned the wrong module handle: %p instead of %p\n", 121 (void *)hMod2, (void *)hMod); 122 123 hMod2 = (HKLDRMOD)0xffffeeee; 124 rc = kLdrDyldFindByName("tst-0-d", NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod2); 125 if (!rc) 126 printf("tst-0-driver: hMod2=%p ('tst-0-d')\n", (void *)hMod2); 127 else 128 Failure("kLdrDyldFindByName(\"tst-0-d\",,,) failed, rc=%d (%#x)\n", rc, rc); 129 130 /* 131 * Get the name and filename for each of the two modules. 132 */ 133 rc = kLdrDyldGetName(hMod2, szBuf, sizeof(szBuf)); 134 if (!rc) 135 { 136 printf("tst-0-driver: name: '%s' ('tst-0-d')\n", szBuf); 137 psz = strstr(szBuf, "-0-"); 138 if ( !psz 139 || strnicmp(psz, "-0-d", sizeof("-0-d") - 1)) 140 Failure("kLdrDyldGetName(\"tst-0-d\",,,) -> '%s': pattern '-0-d' not found\n", szBuf); 141 142 /* overflow test. */ 143 cch = strlen(szBuf); 144 szBuf[cch + 1] = szBuf[cch] = szBuf[cch - 1] = 'x'; 145 szBuf[cch + 2] = '\0'; 146 rc = kLdrDyldGetName(hMod2, szBuf, cch); 147 if (rc == KLDR_ERR_BUFFER_OVERFLOW) 148 { 149 if (!szBuf[0]) 150 Failure("kLdrDyldGetName didn't return partial result on overflow\n"); 151 else if (szBuf[cch - 1]) 152 Failure("kLdrDyldGetName didn't terminate partial result correctly overflow: '%s'\n", szBuf); 153 else if (szBuf[cch] != 'x') 154 Failure("kLdrDyldGetName exceeded the buffer limit on partial overflow: '%s'\n", szBuf); 155 } 156 else 157 Failure("kLdrDyldGetName(\"tst-0-d\",,,) -> rc=%d (%#x) instead of KLDR_ERR_BUFFER_OVERFLOW\n", rc, rc); 158 159 /* check that we can query the module by the returned name. */ 160 rc = kLdrDyldGetName(hMod2, szBuf, sizeof(szBuf)); 161 if (!rc) 162 { 163 hMod3 = (HKLDRMOD)0xffffeeee; 164 rc = kLdrDyldFindByName(szBuf, NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod3); 165 if (rc || hMod3 != hMod2) 166 Failure("kLdrDyldFindByName(\"%s\",,,) failed, rc=%d (%#x) hMod3=%p hMod2=%p\n", 167 szBuf, rc, rc, (void *)hMod3, (void *)hMod2); 168 } 169 else 170 Failure("kLdrDyldGetName(\"tst-0-d\",,,) failed (b), rc=%d (%#x)\n", rc, rc); 171 } 172 else 173 Failure("kLdrDyldGetName(\"tst-0-d\",,,) failed, rc=%d (%#x)\n", rc, rc); 174 175 rc = kLdrDyldGetFilename(hMod2, szBuf, sizeof(szBuf)); 176 if (!rc) 177 { 178 printf("tst-0-driver: filename: '%s' ('tst-0-d')\n", szBuf); 179 180 /* overflow test. */ 181 cch = strlen(szBuf); 182 szBuf[cch + 1] = szBuf[cch] = szBuf[cch - 1] = 'x'; 183 szBuf[cch + 2] = '\0'; 184 rc = kLdrDyldGetFilename(hMod2, szBuf, cch); 185 if (rc == KLDR_ERR_BUFFER_OVERFLOW) 186 { 187 if (!szBuf[0]) 188 Failure("kLdrDyldGetFilename didn't return partial result on overflow\n"); 189 else if (szBuf[cch - 1]) 190 Failure("kLdrDyldGetFilename didn't terminate partial result correctly overflow: '%s'\n", szBuf); 191 else if (szBuf[cch] != 'x') 192 Failure("kLdrDyldGetFilename exceeded the buffer limit on partial overflow: '%s'\n", szBuf); 193 } 194 else 195 Failure("kLdrDyldGetFilename(\"tst-0-d\",,,) -> rc=%d (%#x) instead of KLDR_ERR_BUFFER_OVERFLOW\n", rc, rc); 196 197 /* check that we can query the module by the returned filename. */ 198 rc = kLdrDyldGetFilename(hMod2, szBuf, sizeof(szBuf)); 199 if (!rc) 200 { 201 hMod3 = (HKLDRMOD)0xffffeeee; 202 rc = kLdrDyldFindByName(szBuf, NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod3); 203 if (rc || hMod3 != hMod2) 204 Failure("kLdrDyldFindByName(\"%s\",,,) failed, rc=%d (%#x) hMod3=%p hMod2=%p\n", 205 szBuf, rc, rc, (void *)hMod3, (void *)hMod2); 206 } 207 else 208 Failure("kLdrDyldGetName(\"tst-0-d\",,,) failed (b), rc=%d (%#x)\n", rc, rc); 209 } 210 else 211 Failure("kLdrDyldGetFilename(\"tst-0-d\",,,) failed, rc=%d (%#x)\n", rc, rc); 212 213 /* the other module */ 214 rc = kLdrDyldGetName(hMod, szBuf, sizeof(szBuf)); 215 if (!rc) 216 { 217 printf("tst-0-driver: name: '%s' ('tst-0-a')\n", szBuf); 218 psz = strstr(szBuf, "-0-"); 219 if ( !psz 220 || strnicmp(psz, "-0-a", sizeof("-0-a") - 1)) 221 Failure("kLdrDyldGetName(\"tst-0-a\",,,) -> '%s': pattern '-0-a' not found\n", szBuf); 222 223 /* check that we can query the module by the returned name. */ 224 hMod3 = (HKLDRMOD)0xffffeeee; 225 rc = kLdrDyldFindByName(szBuf, NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod3); 226 if (rc || hMod3 != hMod) 227 Failure("kLdrDyldFindByName(\"%s\",,,) failed, rc=%d (%#x) hMod3=%p hMod=%p\n", 228 szBuf, rc, rc, (void *)hMod3, (void *)hMod); 229 } 230 else 231 Failure("kLdrDyldGetName(\"tst-0-a\",,,) failed, rc=%d (%#x)\n", rc, rc); 232 233 rc = kLdrDyldGetFilename(hMod, szBuf, sizeof(szBuf)); 234 if (!rc) 235 { 236 printf("tst-0-driver: filename: '%s' ('tst-0-a')\n", szBuf); 237 238 /* check that we can query the module by the returned filename. */ 239 hMod3 = (HKLDRMOD)0xffffeeee; 240 rc = kLdrDyldFindByName(szBuf, NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod3); 241 if (rc || hMod3 != hMod) 242 Failure("kLdrDyldFindByName(\"%s\",,,) failed, rc=%d (%#x) hMod3=%p hMod=%p\n", 243 szBuf, rc, rc, (void *)hMod3, (void *)hMod); 244 } 245 else 246 Failure("kLdrDyldGetFilename(\"tst-0-a\",,,) failed, rc=%d (%#x)\n", rc, rc); 247 248 249 /* 250 * Resolve the symbol exported by each of the two modules and call them. 251 */ 252 if (!g_cErrors) 253 { 254 uintptr_t uValue; 255 uint32_t fKind; 256 257 fKind = 0xffeeffee; 258 uValue = ~(uintptr_t)42; 259 rc = kLdrDyldQuerySymbol(hMod, NIL_KLDRMOD_SYM_ORDINAL, MY_NAME("FuncA"), &uValue, &fKind); 260 if (!rc) 261 { 262 if (uValue == ~(uintptr_t)42) 263 Failure("kLdrDyldQuerySymbol(\"tst-0-a\",,\"FuncA\",): uValue wasn't set.\n"); 264 if (fKind == 0xffeeffee) 265 Failure("kLdrDyldQuerySymbol(\"tst-0-a\",,\"FuncA\",): fKind wasn't set.\n"); 266 if ( (fKind & KLDRSYMKIND_BIT_MASK) != KLDRSYMKIND_NO_BIT 267 && (fKind & KLDRSYMKIND_BIT_MASK) != MY_KLDRSYMKIND_BITS) 268 Failure("fKind=%#x indicates a different code 'bit' mode than we running at.\n", fKind); 269 if ( (fKind & KLDRSYMKIND_TYPE_MASK) != KLDRSYMKIND_NO_TYPE 270 && (fKind & KLDRSYMKIND_TYPE_MASK) != KLDRSYMKIND_CODE) 271 Failure("fKind=%#x indicates that \"FuncA\" isn't code.\n", fKind); 272 if (fKind & KLDRSYMKIND_FORWARDER) 273 Failure("fKind=%#x indicates that \"FuncA\" is a forwarder. it isn't.\n", fKind); 274 275 /* call it. */ 276 if (!g_cErrors) 277 { 278 int (*pfnFuncA)(void) = (int (*)(void))uValue; 279 rc = pfnFuncA(); 280 if (rc != 0x42000042) 281 Failure("FuncA returned %#x expected 0x42000042\n", rc); 282 } 283 284 /* 285 * Test kLdrDyldFindByAddress now that we've got an address. 286 */ 287 hMod3 = (HKLDRMOD)0xeeeeffff; 288 rc = kLdrDyldFindByAddress(uValue, &hMod3, NULL, NULL); 289 if (!rc) 290 { 291 uintptr_t offSegment; 292 uint32_t iSegment; 293 294 if (hMod3 != hMod) 295 Failure("kLdrDyldFindByAddress(%#p/*FuncA*/, \"tst-0-a\",,,) return incorrect hMod3=%p instead of %p.\n", 296 uValue, hMod3, hMod); 297 298 hMod3 = (HKLDRMOD)0xeeeeffff; 299 iSegment = 0x42424242; 300 rc = kLdrDyldFindByAddress(uValue, &hMod3, &iSegment, &offSegment); 301 if (!rc) 302 { 303 if (hMod3 != hMod) 304 Failure("Bad hMod3 on 2nd kLdrDyldFindByAddress call.\n"); 305 if (iSegment > 0x1000) /* safe guess */ 306 Failure("Bad iSegment=%#x\n", iSegment); 307 if (offSegment > 0x100000) /* guesswork */ 308 Failure("Bad offSegment=%p\n", (void *)offSegment); 309 } 310 else 311 Failure("kLdrDyldFindByAddress(%#p/*FuncA*/, \"tst-0-a\",,,) failed (b), rc=%d (%#x)\n", 312 uValue, rc, rc); 313 314 /* negative test */ 315 hMod3 = (HKLDRMOD)0xeeeeffff; 316 iSegment = 0x42424242; 317 offSegment = 0x87654321; 318 rc = kLdrDyldFindByAddress(~(uintptr_t)16, &hMod3, &iSegment, &offSegment); 319 if (!rc) 320 Failure("negative kLdrDyldFindByAddress test returned successfully!\n"); 321 if (iSegment != ~(uint32_t)0) 322 Failure("negative kLdrDyldFindByAddress: bad iSegment=%#x\n", iSegment); 323 if (offSegment != ~(uintptr_t)0) 324 Failure("negative kLdrDyldFindByAddress: bad offSegment=%p\n", (void *)offSegment); 325 if (hMod3 != NIL_HKLDRMOD) 326 Failure("negative kLdrDyldFindByAddress: bad hMod3=%p\n", (void *)hMod3); 327 } 328 else 329 Failure("kLdrDyldFindByAddress(%#p/*FuncA*/, \"tst-0-a\",,,) failed, rc=%d (%#x)\n", 330 uValue, rc, rc); 331 } 332 else 333 Failure("kLdrDyldQuerySymbol(\"tst-0-a\",,\"FuncA\",) failed, rc=%d (%#x)\n", rc, rc); 334 335 fKind = 0xffeeffee; 336 uValue = ~(uintptr_t)42; 337 rc = kLdrDyldQuerySymbol(hMod2, NIL_KLDRMOD_SYM_ORDINAL, MY_NAME("FuncD"), &uValue, &fKind); 338 if (!rc) 339 { 340 if (uValue == ~(uintptr_t)42) 341 Failure("kLdrDyldQuerySymbol(\"tst-0-d\",,\"FuncD\",): uValue wasn't set.\n"); 342 if (fKind == 0xffeeffee) 343 Failure("kLdrDyldQuerySymbol(\"tst-0-d\",,\"FuncD\",): fKind wasn't set.\n"); 344 if ( (fKind & KLDRSYMKIND_BIT_MASK) != KLDRSYMKIND_NO_BIT 345 && (fKind & KLDRSYMKIND_BIT_MASK) != MY_KLDRSYMKIND_BITS) 346 Failure("fKind=%#x indicates a different code 'bit' mode than we running at.\n", fKind); 347 if ( (fKind & KLDRSYMKIND_TYPE_MASK) != KLDRSYMKIND_NO_TYPE 348 && (fKind & KLDRSYMKIND_TYPE_MASK) != KLDRSYMKIND_CODE) 349 Failure("fKind=%#x indicates that \"FuncD\" isn't code.\n", fKind); 350 if (fKind & KLDRSYMKIND_FORWARDER) 351 Failure("fKind=%#x indicates that \"FuncD\" is a forwarder. it isn't.\n", fKind); 352 353 /* call it. */ 354 if (!g_cErrors) 355 { 356 int (*pfnFuncD)(void) = (int (*)(void))uValue; 357 rc = pfnFuncD(); 358 if (rc != 0x42000000) 359 Failure("FuncD returned %#x expected 0x42000000\n", rc); 360 } 361 362 /* use the address to get the module handle. */ 363 hMod3 = (HKLDRMOD)0xeeeeffff; 364 rc = kLdrDyldFindByAddress(uValue, &hMod3, NULL, NULL); 365 if (!rc) 366 { 367 if (hMod3 != hMod2) 368 Failure("kLdrDyldFindByAddress(%#p/*FuncD*/,,,) return incorrect hMod3=%p instead of %p.\n", 369 uValue, hMod3, hMod2); 370 } 371 else 372 Failure("kLdrDyldFindByAddress(%#p/*FuncD*/,,,) failed, rc=%d (%#x)\n", 373 uValue, rc, rc); 374 } 375 else 376 Failure("kLdrDyldQuerySymbol(\"tst-0-a\",,\"FuncA\",) failed, rc=%d (%#x)\n", rc, rc); 377 378 } 379 380 /* 381 * Finally unload it. 382 */ 86 383 rc = kLdrDyldUnload(hMod); 87 384 if (rc) 88 385 Failure("kLdrDyldUnload() failed. rc=%d (%#x)\n", rc, rc); 386 if (!rc) 387 { 388 rc = kLdrDyldFindByName("tst-0-d", NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod2); 389 if (rc != KLDR_ERR_MODULE_NOT_FOUND) 390 Failure("kLdrDyldFindByName(\"tst-0-d\",,,) return rc=%d (%#x), expected KLDR_ERR_MODULE_NOT_FOUND\n", rc, rc); 391 392 rc = kLdrDyldFindByName("tst-0-a", NULL, NULL, KLDRDYLD_SEARCH_HOST, 0, &hMod2); 393 if (rc != KLDR_ERR_MODULE_NOT_FOUND) 394 Failure("kLdrDyldFindByName(\"tst-0-a\",,,) return rc=%d (%#x), expected KLDR_ERR_MODULE_NOT_FOUND\n", rc, rc); 395 } 396 } 397 398 /* 399 * Now do what tst-0 would do. 400 */ 401 if (!g_cErrors) 402 { 403 89 404 } 90 405 -
trunk/kLdr/testcase/tst.h
r2841 r2870 42 42 #endif 43 43 44 #if defined(__OS2__) 45 # define MY_NAME(a) "_"##a 46 #else 47 # define MY_NAME(a) a 48 #endif 49 44 50 45 51 extern const char *g_pszName;
Note:
See TracChangeset
for help on using the changeset viewer.