X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/0959b6d4289bd106fddb7fe7d84a346159895fdd..19894a1236eae932b4028640f24ab843f691d4e4:/unit-tests/test-cases/bundle-multi-load/main.c diff --git a/unit-tests/test-cases/bundle-multi-load/main.c b/unit-tests/test-cases/bundle-multi-load/main.c index 5d4d052..ab0382a 100644 --- a/unit-tests/test-cases/bundle-multi-load/main.c +++ b/unit-tests/test-cases/bundle-multi-load/main.c @@ -22,6 +22,7 @@ */ #include #include +#include #include "test.h" // PASS(), FAIL() @@ -32,6 +33,8 @@ int main() { +// NSCreateObjectFileImageFromMemory is only available on Mac OS X - not iPhone OS +#if __MAC_OS_X_VERSION_MIN_REQUIRED NSObjectFileImage ofi; if ( NSCreateObjectFileImageFromFile("test.bundle", &ofi) != NSObjectFileImageSuccess ) { FAIL("NSCreateObjectFileImageFromFile failed"); @@ -51,7 +54,7 @@ int main() } void* func = NSAddressOfSymbol(sym); - fprintf(stderr, "1st address of foo() = %p in module %p in OFI %p\n", func, mod, ofi); + //fprintf(stderr, "1st address of foo() = %p in module %p in OFI %p\n", func, mod, ofi); NSObjectFileImage ofi2; @@ -77,7 +80,7 @@ int main() } void* func2 = NSAddressOfSymbol(sym2); - fprintf(stderr, "2nd address of foo() = %p in module %p in OFI %p\n", func2, mod2, ofi2); + //fprintf(stderr, "2nd address of foo() = %p in module %p in OFI %p\n", func2, mod2, ofi2); if ( func == func2 ) { FAIL("2nd NSAddressOfSymbol return same function address as 1st\n"); return 0; @@ -109,7 +112,7 @@ int main() return 0; } void* func3 = NSAddressOfSymbol(sym3); - fprintf(stderr, "3rd address of foo() = %p in module %p in OFI %p\n", func3, mod3, ofi3); + //fprintf(stderr, "3rd address of foo() = %p in module %p in OFI %p\n", func3, mod3, ofi3); if ( func3 == func ) { FAIL("3rd NSAddressOfSymbol return same function address as 1st\n"); return 0; @@ -147,7 +150,7 @@ int main() FAIL("3rd NSDestroyObjectFileImage failed"); return 0; } - +#endif PASS("bundle-multi-load"); return 0; }