ELF: Improve GetSections() accuracy when only PHT is available

This commit is contained in:
Katy Coe
2020-12-05 19:05:40 +01:00
parent aaa90370d1
commit bdf43a642d
2 changed files with 5 additions and 3 deletions

View File

@@ -473,9 +473,9 @@ namespace Il2CppInspector
ImageEnd = (uint) conv.Int(p.p_offset) + (uint) conv.Int(p.p_filesz) - 1,
// Not correct but probably the best we can do
IsData = (Elf) p.p_type == Elf.PT_LOAD,
IsExec = (Elf) p.p_type == Elf.PT_LOAD,
IsBSS = (Elf) p.p_type == Elf.PT_LOAD,
IsData = ((Elf) p.p_flags & Elf.PF_R) != 0,
IsExec = ((Elf) p.p_flags & Elf.PF_X) != 0,
IsBSS = conv.Int(p.p_filesz) == 0,
Name = string.Empty
});