<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><br>    Hello all,<br style=""><br style="" class="">    I develop <a href="https://github.com/mono/CppSharp">a project based on Clang</a> where I need to read all symbols from a library. For symbols libraries (.a/.lib) I use the following code:<br style="" class=""><br style="" class="">    auto &FM = C->getFileManager();<br style="" class="">    ...<br style="" class="">    auto Buffer = FM.getBufferForFile(FileEntry);<br style="" class="">    ...<br style="" class="">    auto Object = llvm::object::ObjectFile::createObjectFile(Buffer);<br style="" class=""><br style="" class="">    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.<br style="" class=""><br style="" class="">    Thank you for your time,<br style="" class="">    Dimitar Dobrev<br><br style="" class=""><div style="" class="" id="yiv0130216028"><div style="" class=""><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"><div style="" class="" id="yiv0130216028"><div style="" class=""><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"><div style="" class=""></div></div></div></div></div></div></div></div></body></html>