GoReSym
GoReSym copied to clipboard
Refactor Moduledata and Type Version Parsing
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