[llvm] [llvm-dwp] Replace MCStreamer with direct ELF writer for zero-copy output (PR #192112)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 23:55:27 PDT 2026
jh7370 wrote:
> Thanks for looking into this, it's been a longstanding issue with llvm-dwp.
>
> Though one of the reasons I didn't address it earlier, and this might be a case of letting perfect be the enemy of the good, is that I was hoping to have some common abstraction for MCStreamer and DWP to use as a lower level ELF writer they could share.
>
> I know it's not a ton of code to duplicate/diverge between MCStreamer and DWP, but would be nice to not duplicaet it - any chance the lower level ELF writer you've created here could be refactored to be used to implement/beneath MCStreamer?
+1 to this sentiment. We already have the ability to write ELF objects in LLVM (actually multiple ways already, if I'm not mistaken, e.g. llvm-objcopy and ObjectYAML both have implementations). Adding yet another one would be an unfortunate maintenance overhead. Have you looked into the other non-MC variations? Both the two I mentioned in the e.g. might be worth looking at if you haven't already.
https://github.com/llvm/llvm-project/pull/192112
More information about the llvm-commits
mailing list