I'm attempting to write instrumentation that calls a function in a static library that I want to link while pretty-printing the instrumented IR. So far I've managed to do it like so:
- insert the symbol by referencing a fake library:
rewriting_ctx.get_or_insert_extern_symbol('external_call', 'dummy.lib')
- Call gtirb-pprinter as such:
gtirb-pprinter instrumented.gtirb --binary out.exe --compiler-args /link /FORCE:MULTIPLE C:\path\to\mylibrary.lib
Is there a better way to do this?