]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/kernel-pageablekc-auxkc-fixups.dtest/bar.c
2 #include "../kernel-test-runner.h"
4 extern int pageableExport();
5 __typeof(&pageableExport
) pageableExportPtr
= &pageableExport
;
8 return pageableExportPtr() + 2;
11 extern int pageableExportDirect();
13 // Test direct pointer fixups to the pageable KC. On x86_64 these would be emitted as just
14 // a branch relocation so we needed to synthesize a stub
15 __attribute__((constructor
))
16 int testDirectToPageable(const TestRunnerFunctions
* funcs
) {
17 LOG("testDirectToPageable(): start");
18 // The pageable returned 42
19 int v
= pageableExportDirect();
21 FAIL("pageableExportDirect() returned %d vs expected 42", v
);
23 LOG("testDirectToPageable(): end");