]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/chained-fixups-many-binds.dtest/main.c
dyld-750.5.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 #include "test_support.h"
18
19 int main(int argc, const char* argv[], const char* envp[], const char* apple[]) {
20 PASS("Success");
21 }