ELF: Improve GetSections() accuracy when only PHT is available
This commit is contained in:
@@ -473,9 +473,9 @@ namespace Il2CppInspector
|
|||||||
ImageEnd = (uint) conv.Int(p.p_offset) + (uint) conv.Int(p.p_filesz) - 1,
|
ImageEnd = (uint) conv.Int(p.p_offset) + (uint) conv.Int(p.p_filesz) - 1,
|
||||||
|
|
||||||
// Not correct but probably the best we can do
|
// Not correct but probably the best we can do
|
||||||
IsData = (Elf) p.p_type == Elf.PT_LOAD,
|
IsData = ((Elf) p.p_flags & Elf.PF_R) != 0,
|
||||||
IsExec = (Elf) p.p_type == Elf.PT_LOAD,
|
IsExec = ((Elf) p.p_flags & Elf.PF_X) != 0,
|
||||||
IsBSS = (Elf) p.p_type == Elf.PT_LOAD,
|
IsBSS = conv.Int(p.p_filesz) == 0,
|
||||||
|
|
||||||
Name = string.Empty
|
Name = string.Empty
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ namespace Il2CppInspector
|
|||||||
DT_PLTGOT = 3,
|
DT_PLTGOT = 3,
|
||||||
|
|
||||||
PF_X = 1,
|
PF_X = 1,
|
||||||
|
PF_W = 2,
|
||||||
|
PF_R = 4,
|
||||||
|
|
||||||
// SHTs
|
// SHTs
|
||||||
SHT_PROGBITS = 1,
|
SHT_PROGBITS = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user