]> git.saurik.com Git - apple/dyld.git/blob - unit-tests/test-cases/initializer-bounds-check/foo1.c
dyld-195.6.tar.gz
[apple/dyld.git] / unit-tests / test-cases / initializer-bounds-check / foo1.c
1 #include <stdio.h>
2
3 extern void* initializers[] __asm__("section$start$__DATA$__mod_init_func");
4
5 extern void altSecondInit();
6
7
8 __attribute__((constructor))
9 void firstInit()
10 {
11 // slam second initializer to be pointer into another dylib
12 initializers[1] = &altSecondInit;
13 }
14