elf-d
elf-d copied to clipboard
Add segments view
Could you please add a segments view, like the sections view?
Sadly, I don't have time to implement that now. But I will accept a pull request for it. It should be easy to follow the same structure in the code.
I'm also very restricted on time for the next month or so, but let me just add that it's easy to iterate the segments based on what elf-d already provides, in case anybody else needs it:
ELF e = ELF.fromFile(elfFile);
auto pho = e.header.programHeaderOffset;
auto num = e.header.numberOfProgramHeaderEntries;
ubyte[] bin = cast(ubyte[]) std.file.read(elfFile);
Elf32_Phdr* ph = cast(Elf32_Phdr*) (bin[pho .. pho + Elf32_Phdr.sizeof]).ptr;
foreach(p; ph[0..num])
...