X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/39a8cd101b922f08058746122efff58c14b57605..412ebb8e3cc35d457058c31310d89ef96b7c416d:/unit-tests/test-cases/dyld-slide/main.c diff --git a/unit-tests/test-cases/dyld-slide/main.c b/unit-tests/test-cases/dyld-slide/main.c index 2bd67ba..a689f63 100644 --- a/unit-tests/test-cases/dyld-slide/main.c +++ b/unit-tests/test-cases/dyld-slide/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2007 Apple Inc. All rights reserved. + * Copyright (c) 2005-2009 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -21,7 +21,8 @@ * @APPLE_LICENSE_HEADER_END@ */ #include // EXIT_SUCCESS -#include +#include +#include #include "test.h" @@ -39,9 +40,9 @@ int main() { - // call a dyld function that will internally throw an exception to test dyld slide properly - NSAddImage("/foo/bar", NSADDIMAGE_OPTION_RETURN_ON_ERROR); - + // call a dyld function that will execute lots of code and bus error dyld was not slid + dlsym(RTLD_DEFAULT, "foobar"); + return EXIT_SUCCESS; }