GoReSym icon indicating copy to clipboard operation
GoReSym copied to clipboard

Refactor Moduledata and Type Version Parsing

Open stevemk14ebr opened this issue 1 year ago • 2 comments

The logic to parse the moduledata and types is split by version as the underlying structures change every few versions. Originally this was done by creating a Go structure for each version and the marshalling the raw bytes into the appropriate structure by version. Over time this has gotten quite hard to maintain. Refactor this logic, consider if a generic function can be written somehow to avoid the duplicative switch statements.

https://github.com/mandiant/GoReSym/blob/cc91ae744fe2fbab7ef9c0df2f59dac1f8b82643/objfile/objfile.go#L297 https://github.com/mandiant/GoReSym/blob/cc91ae744fe2fbab7ef9c0df2f59dac1f8b82643/objfile/objfile.go#L1176

stevemk14ebr avatar May 13 '24 12:05 stevemk14ebr