]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/dylib-re-export-old-format.dtest/main.c
ea4d7f04141922eea5bb582217a3ffab41d48ec6
[apple/dyld.git] / testing / test-cases / dylib-re-export-old-format.dtest / main.c
1 // BUILD_ONLY: MacOSX
2 // BUILD_MIN_OS: 10.5
3 // BUILD: $CC bar.c -dynamiclib -install_name $RUN_DIR/libbar.dylib -o $BUILD_DIR/libbar.dylib -nostdlib -ldylib1.o
4 // BUILD: $CC foo.c -dynamiclib $BUILD_DIR/libbar.dylib -sub_library libbar -install_name $RUN_DIR/libfoo.dylib -o $BUILD_DIR/libfoo.dylib -nostdlib -ldylib1.o
5 // BUILD: $CC main.c -o $BUILD_DIR/dylib-re-export.exe $BUILD_DIR/libfoo.dylib -L$BUILD_DIR -nostdlib -lSystem -lcrt1.10.5.o
6
7 // RUN: ./dylib-re-export.exe
8
9
10 #include <stdio.h>
11
12 extern int bar();
13
14
15 int main()
16 {
17 printf("[BEGIN] dylib-re-export-old-format\n");
18 if ( bar() == 42 )
19 printf("[PASS] dylib-re-export-old-format\n");
20 else
21 printf("[FAIL] dylib-re-export-old-format, wrong value\n");
22
23 return 0;
24 }
25
26