]> git.saurik.com Git - apple/dyld.git/blame - unit-tests/test-cases/absolute-symbol/main.c
dyld-353.2.1.tar.gz
[apple/dyld.git] / unit-tests / test-cases / absolute-symbol / main.c
CommitLineData
2fd3f4e8
A
1#include <stdio.h> // fprintf(), NULL
2#include <stdlib.h> // exit(), EXIT_SUCCESS
3#include <dlfcn.h>
4
5#include "test.h" // PASS(), FAIL(), XPASS(), XFAIL()
6
7
8extern int var;
9extern void func();
10extern int myAbs1 __attribute__((weak_import));
11extern int myAbs2;
12
13
14int main()
15{
16
17 if (&myAbs1 != 0 ) {
18 FAIL("absolute-symbol: &myAbs1 != 0");
19 return 0;
20 }
21
22
23 if ((uintptr_t)&myAbs2 != 1 ) {
24 FAIL("absolute-symbol: &myAbs2 != 1");
25 return 0;
26 }
27
28
29 PASS("absolute-symbol");
30 return 0;
31}