Skip to content

Reference external symbols from static library (PE binaries) #14

@avncharlie

Description

@avncharlie

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:

  1. insert the symbol by referencing a fake library: rewriting_ctx.get_or_insert_extern_symbol('external_call', 'dummy.lib')
  2. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions