[llvm-dev] Find targets of indirect call sites
Ronny Chevalier via llvm-dev
llvm-dev at lists.llvm.org
Sun Apr 3 04:50:12 PDT 2016
On 02/04/2016 16:14, Syed Rafiul Hussain via llvm-dev wrote:
> I would like to find the targets of indirect callsties. The callsite
> and the targets may be located in different functions or in different
LLVM does not provide such feature.
> Any hint or suggestion would be much appreciated.
You could use the poolalloc project . It includes DSA which allows to
find a list a potential targets of an indirect call. It is worth noting,
however, that such process is an over-approximation, and can be
sometimes incomplete (e.g. indirect call to another module, loss of
Also, John Criswell mentioned multiple issues  regarding the loss of
precision of DSA, because of assumptions it made on the LLVM IR when it
was originally written.llvm
Anyway, I managed to make the current version of poolalloc works with
LLVM 3.7, and some minor patches (but I think DSA can be built on its
own without modifications).
More information about the llvm-dev