konrad-kruczynski / elfsharp

Pure managed C# library for reading ELF, UImage, Mach-O binaries.
https://elfsharp.it
Other
159 stars 57 forks source link

How to get offset of a segment? #33

Closed tathanhdinh closed 7 years ago

tathanhdinh commented 8 years ago

Hi everyone, I am trying to figure out how to get the file offset of a segment in an ELF. I observe that the field offset in Segment has private attribute, so the only way to get offset is to parse again the header of this segment? Is there some reason to make offset as private? Many thanks.

konrad-kruczynski commented 8 years ago

It can be done, no problem, I just have to find some time to do it - which should happen soon.

konrad-kruczynski commented 8 years ago

Alternatively you can code the proposed solution and send here as a PR.

konrad-kruczynski commented 7 years ago

It's now done and available on nuget.