Sanjiv Gupta
2009-Sep-08 17:20 UTC
[LLVMdev] Finding the functions whose addresses are taken.
Hi, How to find in a module, the list of functions whose addresses are ever taken into some variables? - Sanjiv
Kenneth Uildriks
2009-Sep-08 17:23 UTC
[LLVMdev] Finding the functions whose addresses are taken.
Each function is a GlobalValue. Find all the uses of them... any uses that are not a "call" with the function as callee goes into your list. Global variables work the same way. Find the uses of them that are not "Load" or "Store" instructions with the global value as the pointer operand. On Tue, Sep 8, 2009 at 12:20 PM, Sanjiv Gupta<sanjiv.gupta at microchip.com> wrote:> Hi, > How to find in a module, the list of functions whose addresses are ever > taken into some variables? > > - Sanjiv > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Mikhail Glushenkov
2009-Sep-08 21:01 UTC
[LLVMdev] Finding the functions whose addresses are taken.
Kenneth Uildriks <kennethuil <at> gmail.com> writes:> > Each function is a GlobalValue. Find all the uses of them... any uses > that are not a "call" with the function as callee goes into your list.One fun possibility is the following "call which is not a call" (was actually spotted in the wild): call void (...)* bitcast (void (i32)* @exit to void (...)*)(i32 73) noreturn nounwind
Reasonably Related Threads
- [LLVMdev] Finding the functions whose addresses are taken.
- [LLVMdev] PIC16TargetAsmInfo::getBSSSectionForGlobal
- [LLVMdev] llvm-ld -disable-opt behavior.
- [LLVMdev] SoftenSetCCOpernads in LegalizeFloatTypes.cpp
- [LLVMdev] SoftenSetCCOpernads in LegalizeFloatTypes.cpp