| 1 | // -*- C++ -*-cxx . . $ `<file>/vendor/Heap-Layers/wrappers/macinterpose.h`/ |
| 2 | |
| 3 | #ifndef HL_MACINTERPOSE_H |
| 4 | #define HL_MACINTERPOSE_Hcxx . . $ `vendor/Heap-Layers/wrappers/macinterpose.h:4:9`! |
| 5 | |
| 6 | // The interposition data structure (just pairs of function pointers), |
| 7 | // used an interposition table like the following: |
| 8 | // |
| 9 | |
| 10 | typedef struct interpose_scxx . . $ interpose_s# { |
| 11 | void *new_funccxx . . $ interpose_s#new_func.; |
| 12 | void *orig_funccxx . . $ interpose_s#orig_func.; |
| 13 | } interpose_tcxx . . $ interpose_t#; |
| 14 | |
| 15 | #define MAC_INTERPOSEcxx . . $ `vendor/Heap-Layers/wrappers/macinterpose.h:15:9`!(newf,oldf) __attribute__((used)) \ |
| 16 | static const interpose_t macinterpose##newf##oldf \ |
| 17 | __attribute__ ((section("__DATA, __interpose"))) = \ |
| 18 | { (void *) newf, (void *) oldf } |
| 19 | |
| 20 | #endif |