Skip to content
Discussion options

You must be logged in to vote

There is a built-in mechanism that is close to what you want: a decompiler call-site prototype override. In the UI it is the Override Signature action. Under the hood it writes an override for one call instruction, not for the callee globally, via HighFunctionDBUtil.writeOverride(function, callsite, functionSignature).

For automation I would not try to change __tls_get_addr itself, because the return type is intentionally call-site dependent in your case. The usual shape is:

  1. Open a DecompInterface and decompile each function.
  2. Get DecompileResults.getHighFunction().
  3. Walk the PcodeOpAST ops and find CALL ops whose destination resolves to __tls_get_addr.
  4. Inspect the argument varnode. If it …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@michael-g
Comment options

Answer selected by michael-g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants