[LLVMdev] supporting dwarf relocations

Nick Lewycky nlewycky at google.com
Tue Nov 1 18:31:42 PDT 2011


In ELF .o files with debug info, there are relocations applied to the DWARF
sections. For example, when emitting offsets into the stringpool, we emit a
relocation.

How should we support this? llvm-dwarfdump currently works by finding the
relevant dwarf sections and passing them in to lib/DebugInfo. The
relocations can be iterated over in lib/Object using the
relocation_iterator.

Should dwarfdump apply its own relocations and hand DebugInfo a copy of the
sections from the input file? Should DebugInfo take the Object and do
relocations in its head as needed? How about a wrapper that provides a
"relocated view" of a section, and we pass that around? At a high level,
what ought these APIs look like? Who's responsible for what?

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


More information about the llvm-dev mailing list