]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/kernel-pageablekc-fixups.dtest/foo.c
   2 #include "../kernel-test-runner.h" 
   5 __typeof(&bar
) barPtr 
= &bar
; 
  11 __attribute__((constructor
)) 
  12 int test(const TestRunnerFunctions
* funcs
) { 
  14     // kernel, bar, and foo each added 1, 2, 4, so we need to return 7 to know this worked 
  17         FAIL("foo() returned %d vs expected 7", v
); 
  27 // Test direct pointer fixups, ie, not via a GOT 
  28 __attribute__((constructor
)) 
  29 int testDirect(const TestRunnerFunctions
* funcs
) { 
  30     LOG("testDirect(): start"); 
  31     // kernel, bar, and foo each added 1, 2, 4, so we need to return 7 to know this worked 
  34         FAIL("fooDirect() returned %d vs expected 7", v
); 
  36     LOG("testDirect(): end");