That's what I get for moving the patch between machines. Attached here along with one of the comments that Eli wanted.<div><br></div><div>-eric</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 6, 2012 at 12:00 AM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Nov 5, 2012 at 5:17 PM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br>

> For llvm-dwarfdump we need to handle relocations inside the debug info<br>
> sections in order to successfully dump the dwarf info including strings.<br>
> Nick sent out a partial patch that did this not too long ago and I've taken<br>
> it and gone in a bit of a different direction, but kept the same basic<br>
> architecture.<br>
><br>
> In place of applying the relocations to the data we've read from disk I'm<br>
> keeping a separate mapping table to the side and checking that at locations<br>
> in the dwarf I'm expecting relocated values. This adds a bit of complexity<br>
> to the dwarf parsing/extraction at the benefit of not allocating memory for<br>
> the entire size of the debug info section.<br>
><br>
> Couple of areas that will need to be improved later:<br>
><br>
> a) Relocations in more than a single section: the .debug_info section is the<br>
> primary one I cared about first, however, we'll need either<br>
>   1) A better mapping that contains section + address (since the debug<br>
> sections are mapped at address 0 I can't just use total offset)<br>
>   2) More mappings per section we're disassembling<br>
><br>
> I'm likely to go with #2 rather than #1, but I'm open to any rationale<br>
> either direction.<br>
><br>
> b) Symbol relocations for function sections and/or functions as well as<br>
> hooking it into, e.g. the aranges disassembly.<br>
><br>
> I've got plans to add these things as I go along, but since it was now<br>
> pretty usable for testing/dumping I wanted to get it in and then incremental<br>
> on top of it.<br>
><br>
> Thoughts?<br>
><br>
> -eric<br>
><br>
</div></div>> _______________________________________________<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>
<br>
This seems to be missing RelocVisitor.h<br>
<span class="HOEnZb"><font color="#888888"><br>
- Michael Spencer<br>
</font></span></blockquote></div><br></div>