konrad-kruczynski / elfsharp

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

Expose Header Properties #50

Closed FZFalzar closed 4 years ago

FZFalzar commented 4 years ago

Is there any way to access the properties of e.g Section Header like Start Address/Size like how the Section.ToString() method prints out the following:

text: ProgBits, load @0x3A02C0, 39796240 bytes long

So that one can access it by the following: mySection.Address, mySection.Size

Currently I am splitting this string manually and it is unwieldy.

konrad-kruczynski commented 4 years ago

This is available, but only from specific ELF classes (not IELF interface that covers 32-bit and 64-bit binaries). Please look at http://elfsharp.turtleware.eu/examples.shtml#bit32 and tell me if it answers your question.

FZFalzar commented 4 years ago

Yes it did, didn't think of opening the link at the front page since usually I'd refer to github's wiki or Readme.md for quick docs especially when dealing with plugins/libraries on different languages. Thanks! Closing issue.