<div dir="ltr">Hello,<div><br></div><div><br></div><div>I hope you are all doing well and thanks in advance. I need to program a transformation of a set of llvm bitcode to have some various techniques woven in. In particular, I need to resolve a given computed target address to one of several in the same way that the function of a dynamic library is resolved, but I need this resolution to happen in the binary target of my choice where I tell it to. It's basically exactly the same facility as when you compile a group of files as a shared library target. The only difference is, I need this to happen under my control, according to function targets that I can choose and for an argument value that I can also choose as an ordinal to look them up. </div><div><br></div><div>I think that I may need to write a compiler pass where this occurs but part of the problem is 1) I don't know how to make such a thing occur at the bitcode level, 2) and the oridinal is calculated from the instruction pointer. <br><br>Can anybody help? Is there a library or function call for calculating lookup tables from a given set of targets given an ordinal? Is there a way to obtain the instruction pointer in llvm bitcode?</div></div>