Out-of-band info table provenance
Some users have expressed a desire to distribute executables without info table provenance information (e.g. to reduce binary size) but not sacrifice the ability to interpret IPE profile (using, e.g., eventlog2html
). There are two ways in which we could implement this:
- have the user compile the executable with IPE information, use a post-processing tool to extract this information from the executable into an out-of-band file, and strip the IPE data from the executable
- teach GHC to emit IPE information to a separate file itself
Having thought through the implications of option (1), I believe this it is infeasible. Concretely, it would be extremely difficult to remove the IPE registration initializer from the initializer array, making it impossible to safely remove the IPE data, even if it were emitted to a separate section (which on some platforms is not possible).
This leaves option (2). It would be fairly straightforward to teach GHC to serialize IPE metadata to an external file. However, this would mean we would be on the hook to maintain this feature (and output format) upstream.