File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,17 @@ enum _dyld_section_location_kind {
58
58
#define _dyld_section_location_text_swift5_replace2 4
59
59
#define _dyld_section_location_text_swift5_ac_funcs 5
60
60
61
- #if !OBJC_ADDLOADIMAGEFUNC2_DEFINED
61
+ #if OBJC_ADDLOADIMAGEFUNC2_DEFINED
62
+ // Redefine _dyld_lookup_section_info as weak so we can build against it but
63
+ // still run when it's not present at runtime. Note that we don't have to check
64
+ // for its presence at runtime, as it's guaranteed to be available if we get
65
+ // the callbacks from objc_addLoadImageFunc2.
66
+ LLVM_ATTRIBUTE_WEAK
67
+ struct _dyld_section_info_result
68
+ _dyld_lookup_section_info (const struct mach_header *mh,
69
+ _dyld_section_location_info_t locationHandle,
70
+ enum _dyld_section_location_kind kind);
71
+ #else
62
72
// If we don't have objc_addLoadImageFunc2, fall back to objc_addLoadImageFunc.
63
73
// Use a #define so we don't have to conditionalize the calling code below.
64
74
#define objc_addLoadImageFunc2 objc_addLoadImageFunc
You can’t perform that action at this time.
0 commit comments