File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,14 @@ void swift_addNewDSOImage(swift::MetadataSections *sections) {
129
129
swift::addImageAccessibleFunctionsBlockCallback (
130
130
baseAddress, functions, accessible_funcs_section.length );
131
131
132
- const auto &runtime_attribs_section = sections->swift5_runtime_attributes ;
133
- const void *functions =
134
- reinterpret_cast <void *>(runtime_attribs_section.start );
135
- if (runtime_attribs_section.length )
136
- swift::addImageRuntimeAttributesBlockCallback (
137
- baseAddress, functions, runtime_attribs_section.length );
132
+ if (sections->version >= 3 ) {
133
+ const auto &runtime_attribs_section = sections->swift5_runtime_attributes ;
134
+ const void *functions =
135
+ reinterpret_cast <void *>(runtime_attribs_section.start );
136
+ if (runtime_attribs_section.length )
137
+ swift::addImageRuntimeAttributesBlockCallback (
138
+ baseAddress, functions, runtime_attribs_section.length );
139
+ }
138
140
139
141
// Register this section for future enumeration by clients. This should occur
140
142
// after this function has done all other relevant work to avoid a race
You can’t perform that action at this time.
0 commit comments