]>
git.saurik.com Git - apple/dyld.git/blob - testing/kernel-cache-tests/ctf-arm64e/main.cpp
9 __typeof(&func
) funcPtr
;
10 __typeof(&func
) funcPtr2
;
12 __attribute__((aligned((16384)))) __typeof(&func
) funcPtr3
;
16 S s
= { &func
, &func
, &g
, &func
, &g
};
18 struct __attribute__((packed
)) PackedS
{
20 __typeof(&func
) funcPtr
; // aligned to 4
21 __typeof(&func
) funcPtr2
; // aligned to 4
23 int *p1
; // aligned to 8
25 int *p2
; // aligned to 4
28 __attribute__((aligned((16384))))
29 PackedS ps
= { 0, &func
, &func
, 0, &g
, 0, &g
};
31 // We want a section in __TEXT so that ctf_insert works
32 __attribute__((section(("__TEXT,__const"))))
35 extern "C" int _start() {
36 return s
.funcPtr() + s
.funcPtr2() + s
.funcPtr3() + ps
.funcPtr() + x
;