<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 22, 2014 at 2:41 PM, Dorrington, Albert <span dir="ltr"><<a href="mailto:albert.dorrington@lmco.com" target="_blank">albert.dorrington@lmco.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">I am trying to learn how the ELF output generation works within LLVM. Specifically, I am trying to understand how the symbol table gets populated.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have not had much luck finding documentation regarding this process, and trying to look through the source code has made me much more confused at this point.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is there any overview documentation that exists?</p></div></div></blockquote><div><br></div><div>AFAIK there are two primary places in LLVM that create ELF.</div><div><br></div><div>One is inside the code generator and is part of MC; probably you can dive in at <<a href="http://llvm.org/docs/doxygen/html/ELFObjectWriter_8cpp_source.html">http://llvm.org/docs/doxygen/html/ELFObjectWriter_8cpp_source.html</a>> in particular ELFObjectWriter::WriteSymbolTable. Searching for "llvm MC" for lots of relatively good overview documentation for the MC library generically. AFAIK, there is no "overview" documentation regarding the actual ELF emission process; you will need to read the source code and/or ask questions on the mailing list.</div>
<div><br></div><div>The other part is LLD's output routines which assembles the ELF file from it's internal "atom" representation. There is no documentation for this ELF emission process either AFAIK. You will need to use the source code.</div>
<div><br></div><div>One other place that creates ELF, but which is probably not going to be very helpful to you, is llvm/tools/yaml2obj/yaml2elf.cpp, but that is mostly a testing tool and is still in a pretty rudimentary state.</div>
<div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple">
<div><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:14pt">Al Dorrington<u></u><u></u></span></b></p>
<p class="MsoNormal"><i><span style="font-size:10pt">Software Engineer Sr<u></u><u></u></span></i></p>
<p class="MsoNormal"><i><span style="font-size:10pt">Lockheed Martin, Mission Systems and Training<u></u><u></u></span></i></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>