Open avncharlie opened 3 months ago
Unfortunately I don't think so. This is about how I would go about doing the same thing on Linux for static libraries, FWIW.
We have internal transforms that disassemble the static library to GTIRB IR, then stitches that into the target IR but in my experience that's much more hassle than it's worth (you have to deal with merging different symbol types and references, COMDATs, etc).
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:
rewriting_ctx.get_or_insert_extern_symbol('external_call', 'dummy.lib')
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?