[PATCH] D57007: [llvm-objcopy] [COFF] Implement --add-gnu-debuglink

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 22 08:57:51 PST 2019


mstorsjo marked an inline comment as done.
mstorsjo added inline comments.


================
Comment at: llvm/trunk/tools/llvm-objcopy/COFF/Writer.cpp:292-293
 
     // For executable sections, pad the remainder of the raw data size with
     // 0xcc, which is int3 on x86.
     if ((S.Header.Characteristics & IMAGE_SCN_CNT_CODE) &&
----------------
jhenderson wrote:
> I didn't spot this earlier, but why are you padding assuming it is x86?
Yeah, ideally we'd use a different padding pattern for other arches. So far, LLD/COFF always uses this padding pattern regardless of architecture (while LLD/ELF uses arch specific paddings), and I'm matching that behaviour for now here. I'd like to bring it up for discussion in LLD first, and once some other paddings are settled on there, I'd implement the same over here.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57007/new/

https://reviews.llvm.org/D57007





More information about the llvm-commits mailing list