mjhouse / deaf

A library for inspecting/modifying ELF binaries
GNU General Public License v3.0
7 stars 0 forks source link

Turn the Segment struct into a Segment/SegmentMut wrapper struct #45

Open mjhouse opened 1 year ago

mjhouse commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, the Segment struct is mostly empty, but it owns the data that it is referencing. This means that changes at the Segment level don't actually modify section data in the binary.

Describe the solution you'd like Segment structs should be turned into Segment and SegmentMut wrapper structs, similar to Table/TableMut, that reference a slice (or mutable slice) of Sections.

Additional context Segments are aligned to the page size^1 and may hold partial Section data- I'm not sure about this. If they do, then this issue may be significantly more complicated than I expect it to be.