[llvm] [llvm-dwp] Replace MCStreamer with direct ELF writer for zero-copy output (PR #192112)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 01:02:21 PDT 2026


MaskRay wrote:

I agree that MC is not the best fit for llvm-dwp.  MCObjectStreamer::emitBytes copies StringRef into MCDataFragment::Contents, and it is not feasible to avoid the copy. Removing the MC setup complexity is also nice.
Note: fragment granularity is a non-issue if we call `ensureHeadroom` , provided llvm-dwp doesn't need visibility into the section fragments themselves.

ObjCopy is worth exploring.

https://github.com/llvm/llvm-project/pull/192112


More information about the llvm-commits mailing list