This commit is contained in:
Perfare 2020-03-07 19:35:58 +08:00
parent 4525df6334
commit bf69e83ea7
2 changed files with 14 additions and 8 deletions

View file

@ -105,7 +105,7 @@ namespace Il2CppDumper
{
var plusSearch = new PlusSearch(this, methodCount, typeDefinitionsCount, maxMetadataUsages);
plusSearch.SetSection(SearchSectionType.Exec, header.TextSegment);
plusSearch.SetSection(SearchSectionType.Data, header.DataSegment);
plusSearch.SetSection(SearchSectionType.Data, header.DataSegment, header.RoDataSegment);
plusSearch.SetSection(SearchSectionType.Bss, header.BssSegment);
var codeRegistration = plusSearch.FindCodeRegistration();
var metadataRegistration = plusSearch.FindMetadataRegistration();

View file

@ -117,16 +117,22 @@ namespace Il2CppDumper
SetSection(type, secs);
}
public void SetSection(SearchSectionType type, NSOSegmentHeader section)
public void SetSection(SearchSectionType type, params NSOSegmentHeader[] sections)
{
var secs = new List<SearchSection>();
secs.Add(new SearchSection
foreach (var section in sections)
{
offset = section.FileOffset,
offsetEnd = section.FileOffset + section.DecompressedSize,
address = section.MemoryOffset,
addressEnd = section.MemoryOffset + section.DecompressedSize
});
if (section != null)
{
secs.Add(new SearchSection
{
offset = section.FileOffset,
offsetEnd = section.FileOffset + section.DecompressedSize,
address = section.MemoryOffset,
addressEnd = section.MemoryOffset + section.DecompressedSize
});
}
}
SetSection(type, secs);
}