]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/upward-links-initializers.dtest/main.c
1 // BUILD: $CC value.c -dynamiclib -install_name $RUN_DIR/libvalue.dylib -o $BUILD_DIR/libvalue.dylib
2 // BUILD: $CC init4.c -dynamiclib -install_name $RUN_DIR/libinit4.dylib -o $BUILD_DIR/libinit4.dylib $BUILD_DIR/libvalue.dylib
3 // BUILD: $CC init5.c -dynamiclib -install_name $RUN_DIR/libinit5.dylib -o $BUILD_DIR/libinit5.dylib $BUILD_DIR/libinit4.dylib $BUILD_DIR/libvalue.dylib
4 // BUILD: $CC init6.c -dynamiclib -install_name $RUN_DIR/libinit6.dylib -o $BUILD_DIR/libinit6.dylib $BUILD_DIR/libinit5.dylib $BUILD_DIR/libvalue.dylib
5 // BUILD: $CC init1.c -dynamiclib -install_name $RUN_DIR/libinit1.dylib -o $BUILD_DIR/libinit1.dylib -Wl,-upward_library,$BUILD_DIR/libinit6.dylib $BUILD_DIR/libvalue.dylib
6 // BUILD: $CC init2.c -dynamiclib -install_name $RUN_DIR/libinit2.dylib -o $BUILD_DIR/libinit2.dylib $BUILD_DIR/libinit1.dylib $BUILD_DIR/libvalue.dylib
7 // BUILD: $CC init3.c -dynamiclib -install_name $RUN_DIR/libinit3.dylib -o $BUILD_DIR/libinit3.dylib $BUILD_DIR/libinit2.dylib $BUILD_DIR/libvalue.dylib
8 // BUILD: $CC main.c -o $BUILD_DIR/upward-link-initializers.exe -DRUN_DIR="$RUN_DIR" $BUILD_DIR/libinit3.dylib
19 * libinit5 -----------libinit1
24 * libinit1: lowest direct dependency from top level lib (libinit3)
25 * libinit6: only ever brought via upward link dependency, and should not be initialized before libinit1
26 * libinit4: lowest direct dependency from dangling upward (libinit6)
29 // RUN: ./upward-link-initializers.exe
36 #include "test_support.h"
38 int main(int argc
, const char* argv
[], const char* envp
[]) {
39 // Initializers tests passed