dyld-732.8.tar.gz
[apple/dyld.git] / testing / test-cases / chained-fixups-many-binds.dtest / main.c
1
2 // BUILD: $CC foo.c -dynamiclib -o $BUILD_DIR/libFoo.dylib -install_name $RUN_DIR/libFoo.dylib
3 // BUILD: $CC main.c -o $BUILD_DIR/chained-fixups-many-binds.exe $BUILD_DIR/libFoo.dylib -Wl,-fixup_chains
4
5 // RUN: ./chained-fixups-many-binds.exe
6
7 // Here's how to generate this monster
8 // ( for i in `seq 1 65000`; do echo "void foo$i() { }"; done ) > foo.c
9 // ( for i in `seq 1 65000`; do echo "extern void foo$i();"; done ) > foo.h
10 // ( for i in `seq 1 65000`; do echo "__attribute__((used)) void* use$i = (void*)&foo$i;"; done ) > uses.h
11
12 #include <stdio.h>
13
14 #include "foo.h"
15 #include "uses.h"
16
17 int main() {
18 printf("[BEGIN] chained-fixups-many-binds\n");
19 printf("[PASS] chained-fixups-many-binds\n");
20 return 0;
21 }