[LLVMdev] How to get the symbols from a .so file?
Dimitar Dobrev
dpldobrev at yahoo.com
Tue Jul 22 11:09:31 PDT 2014
Hello all,
I develop a project based on Clang where I need to read all symbols from a library. For symbols libraries (.a/.lib) I use the following code:
auto &FM = C->getFileManager();
...
auto Buffer = FM.getBufferForFile(FileEntry);
...
auto Object = llvm::object::ObjectFile::createObjectFile(Buffer);
This code crashes at the last line if the file in question is a shared object (.so). Apparently I need to use different code to parse a shared object but I have little idea what. Any help will be appreciated.
Thank you for your time,
Dimitar Dobrev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140722/2ad64043/attachment.html>
More information about the llvm-dev
mailing list