]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/weak-coalesce.dtest/foo2.c
dyld-851.27.tar.gz
[apple/dyld.git] / testing / test-cases / weak-coalesce.dtest / foo2.c
1 #include <stdio.h>
2
3 #include "test_support.h"
4
5 #include "base.h"
6
7 int coal1 = 2; // note: this is not weak and therefore should win
8 int __attribute__((weak)) coal2 = 2;
9
10 static __attribute__((constructor))
11 void myinit(int argc, const char* argv[], const char* envp[], const char* apple[])
12 {
13 LOG("myinit() in foo1.c");
14 baseVerifyCoal1("in foo2", &coal1);
15 baseVerifyCoal2("in foo2", &coal2);
16 }