We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 36786a0 + 8624325 commit 9a4d2a3Copy full SHA for 9a4d2a3
include/swift/Reflection/ReflectionContext.h
@@ -154,9 +154,11 @@ class ReflectionContext
154
SectAddress + (I * sizeof(typename T::Section)));
155
if (strncmp(S->sectname, Name.c_str(), strlen(Name.c_str())) != 0)
156
continue;
157
- auto SecStart = Start + S->offset;
+ auto Slide = ImageStart.getAddressData() - Command->vmaddr;
158
+ auto RemoteSecStart = S->addr + Slide;
159
+ auto LocalSecStart = RemoteSecStart - ImageStart.getAddressData() + Start;
160
auto SecSize = S->size;
- return {{SecStart, SecStart + SecSize}, 0};
161
+ return {{LocalSecStart, LocalSecStart + SecSize}, 0};
162
}
163
return {{nullptr, nullptr}, 0};
164
};
0 commit comments