1 #pragma once
2 
3 #include <LinkerInternals.h>
4 
5 #include "plt_aarch64.h"
6 
7 #if defined(aarch64_HOST_ARCH)
8 
9 #if defined(OBJFORMAT_MACHO)
10 
11 #if defined(__x86_64__)
12 #define __suffix__ X86_64
13 #elif defined(__aarch64__) || defined(__arm64__)
14 #define __suffix__ Aarch64
15 #else
16 #error "unknown architecture"
17 #endif
18 
19 #define PASTE(x,y) x ## y
20 #define EVAL(x,y) PASTE(x,y)
21 #define ADD_SUFFIX(x) EVAL(PASTE(x,),__suffix__)
22 
23 unsigned numberOfStubsForSection( ObjectCode *oc, unsigned sectionIndex);
24 
25 #define STUB_SIZE          ADD_SUFFIX(stubSize)
26 
27 bool findStub(Section * section, void* * addr, uint8_t flags);
28 bool makeStub(Section * section, void* * addr, uint8_t flags);
29 
30 void freeStubs(Section * section);
31 
32 #endif // OBJECTFORMAT_MACHO
33 
34 #endif // aarch64_HOST_ARCH
35 
36