[LLVMdev] accessing personality and other exception related functions

charles quarra charllsnotieneningunputocorreo at gmail.com
Wed Nov 7 12:16:13 PST 2012


Hi,


in ExceptionDemo code (
https://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp?view=markup&sortby=file
) the function "ourPersonality" is defined. a llvm::Function is
created with the same name inside function
"createStandardUtilityFunctions". The llvm::Function is retrieved in
function "createCatchWrappedInvokeFunction". But nowhere i can find
where a mapping between the actual function address and this
llvm::Function is done, i was expecting to find some sort of
addGlobalMapping somewhere tying both ends, but i cannot find it.

So, my question is; is llvm::Module::getFunction resorting to some
local symbol binary search when the function is unmapped? how does it
find the actual "ourPersonality" function?

Would it work the same if i just replaced that name with
"__gxx_personality_v0"? or do i need to link my executable against
some library?



More information about the llvm-dev mailing list