mjhouse / deaf

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

Investigate changing `Table<T>` into a pure wrapper struct #38

Closed mjhouse closed 1 year ago

mjhouse commented 1 year ago

Is your feature request related to a problem? Please describe. At the moment, if the binary returns a table, it's disconnected from the original section (although it can be converted back to a section using From). If the caller changes the table, those changes aren't reflected in the original section.

Describe the solution you'd like The Table<T> struct should wrap a mutable reference to the original section instead of being standalone. When table items are iterated, they should be parsed lazily, and when they are changed, they should update the original section.

Describe alternatives you've considered

  1. Having get/set methods instead of mutable section references
  2. Internally holding tables for each table-like section and applying changes during an update pass
mjhouse commented 1 year ago

Resolved by #40