[PATCH] D17694: Enhancing MCStreamer to support referential (rather than copy) emission of bytes and use that to reduce the memory footprint of llvm-dwp

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 08:36:39 PDT 2016


On Thu, Apr 7, 2016 at 7:23 AM, Rafael EspĂ­ndola <
llvm-commits at lists.llvm.org> wrote:

> David and I discussed a bit on IRC, but looks like it never got logged.
> Sorry.
>
> So, from the discussion:
>
> * dwp is not really a linker (no relocations if I remember correctly)
>

That's correct - it has some context-sensitive/domain-specific stuff in
place of relocations, essentially (strings are indirected through
str_offsets, and sections are indirected through the cu_index and
tu_index). I'd say the nearest model is "linker with a different relocation
system" (& indeed binutils dwp was implemented using gold's APIs)


> * dwp is not really an assembler (no relaxations)
>

Right (I just started with MC cargo-culting in from llvm-dsymutil to work
up a prototype, but the more I poke at it, the more linker-ish it feels)


>
> So it seems that what needs to happen is that instead of dwp using MC,
> lib/MC/ELFObjectWriter.cpp should be refactored into a small library
> that bot MC and dwp can use.
>

Yeah. Likely - I've been looking at the code in that direction for the last
couple of days. Not sure what I'll be able to make of it (& whether the
generalization will apply to non-ELF as well, hopefully it does - there's
nothing really about the DWP format that's ELF-specific. It's just sections
with bytes, no relocs, etc)


>
> Cheers,
> Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160407/8cdef56b/attachment.html>


More information about the llvm-commits mailing list