1 | #include <libkern/libkern.h> |
---|---|
2 | #include <libkern/section_keywords.h> |
3 | #include <libkern/image4/dlxk.h> |
4 | |
5 | #pragma mark Module Globals |
6 | SECURITY_READ_ONLY_LATE(const image4_dlxk_interface_t *) _dlxk = NULL; |
7 | |
8 | #pragma mark KPI |
9 | void |
10 | image4_dlxk_link(const image4_dlxk_interface_t *dlxk) |
11 | { |
12 | if (_dlxk) { |
13 | panic("image4 dlxk interface already set"); |
14 | } |
15 | _dlxk = dlxk; |
16 | } |
17 | |
18 | const image4_dlxk_interface_t * |
19 | image4_dlxk_get(image4_struct_version_t v) |
20 | { |
21 | if (v > _dlxk->dlxk_version) { |
22 | return NULL; |
23 | } |
24 | return _dlxk; |
25 | } |
26 |