File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -219,24 +219,9 @@ class ReflectionContext
219
219
for (unsigned I = 0 ; I < NumSect; ++I) {
220
220
auto S = reinterpret_cast <typename T::Section *>(
221
221
SectionsBuf + (I * sizeof (typename T::Section)));
222
- if (strncmp (S->sectname , Name.data (), strlen (Name. data () )) != 0 )
222
+ if (strncmp (S->sectname , Name.data (), sizeof (S-> sectname )) != 0 )
223
223
continue ;
224
224
225
- // The above check verifies that `Name` is a prefix to the examined
226
- // section name, to allow for matching of sections with a suffix
227
- // like `_TEXT`, etc.
228
- // "__swift5_proto" section name is a substring of "__swift5_protos",
229
- // Ensure we don't return the latter when looking for the former.
230
- SwiftObjectFileFormatMachO ObjectFileFormat;
231
- if (Name.data () ==
232
- ObjectFileFormat.getSectionName (ReflectionSectionKind::conform)) {
233
- auto protocolsSectionName =
234
- ObjectFileFormat.getSectionName (ReflectionSectionKind::protocs);
235
- if (strncmp (S->sectname , protocolsSectionName.data (),
236
- strlen (protocolsSectionName.data ())) == 0 )
237
- continue ;
238
- }
239
-
240
225
auto RemoteSecStart = S->addr + Slide;
241
226
auto LocalSectBuf =
242
227
this ->getReader ().readBytes (RemoteAddress (RemoteSecStart), S->size );
You can’t perform that action at this time.
0 commit comments