[LLVMdev] a question about funtion information

John Criswell criswell at illinois.edu
Thu May 8 07:36:46 PDT 2014


On 5/8/14, 4:06 AM, Qixue Xiao wrote:
> Hi, every one,
>
> I want to know  a function linked from which object in llvm bitcode, 
> how should I do?
> for example, when I get the function named xxx, I want to know 
> function xxx whether is from libc library or other object.
>
> I have used the linkage type to check it, but functions in libc or my 
> program are both ExternalLinkage.

The only way of which I can think to do this is to examine the debug 
metadata associated with the function to determine the name of the 
source file from which it comes.  However, that requires knowing the 
difference source file names for libc, and I think debug information may 
not be present.  At best, it's a heuristic solution.

Regards,

John Criswell

>
> thanks.
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140508/c9f4cd74/attachment.html>


More information about the llvm-dev mailing list