[LLVMdev] LLVM ELF generation questions
chisophugis at gmail.com
Thu Jan 23 12:04:25 PST 2014
On Wed, Jan 22, 2014 at 2:41 PM, Dorrington, Albert <
albert.dorrington at lmco.com> wrote:
> 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.
> 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.
> Is there any overview documentation that exists?
AFAIK there are two primary places in LLVM that create ELF.
One is inside the code generator and is part of MC; probably you can dive
in at <http://llvm.org/docs/doxygen/html/ELFObjectWriter_8cpp_source.html>
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.
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.
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.
-- Sean Silva
> *Al Dorrington*
> *Software Engineer Sr*
> *Lockheed Martin, Mission Systems and Training*
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev