upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/loader_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/test/loader_test.cpp')
-rw-r--r--runtime/test/loader_test.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/runtime/test/loader_test.cpp b/runtime/test/loader_test.cpp
index 7a4e10cfd..3ed83747a 100644
--- a/runtime/test/loader_test.cpp
+++ b/runtime/test/loader_test.cpp
@@ -470,23 +470,6 @@ void test_imports() {
470 dir.Size = sizeof(IMAGE_IMPORT_DESCRIPTOR); 470 dir.Size = sizeof(IMAGE_IMPORT_DESCRIPTOR);
471 expect_rejects("an import thunk table that runs past the image", img); 471 expect_rejects("an import thunk table that runs past the image", img);
472 } 472 }
473 for (const char* dll : {"TestShim", "testshim.dll."}) {
474 // LoadLibrary's file-name rule keys these the same as testshim.dll; without that normalisation the
475 // shim lookup misses while a real host namesake would still bind.
476 const std::string what = std::string("an import naming ") + dll + " resolves to testshim.dll's shim";
477 auto importer = write_image_as(make_import_image(dll, "F"), "importer_key.exe");
478 try {
479 rt::Loader loader(g_dir);
480 rt::Module& m = loader.load(importer);
481 if (m.imports.size() != 1 || m.imports[0].binding != rt::Binding::Shim)
482 return failed(what.c_str(), "the import did not bind as a shim");
483 if (*reinterpret_cast<void**>(m.base + 0x1180) != reinterpret_cast<void*>(&test_shim_function))
484 return failed(what.c_str(), "the address table does not hold the shim function");
485 pass(what.c_str());
486 } catch (const std::exception& e) {
487 failed(what.c_str(), e.what());
488 }
489 }
490} 473}
491 474
492void test_import_name_rvas() { 475void test_import_name_rvas() {