[PATCH] D73107: [llvm-objcopy][COFF] Add support for --set-section-flags

Sergey Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 18:20:11 PST 2020


sdmitriev added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/COFF/set-section-flags.test:1
+# RUN: yaml2obj %s > %t
+
----------------
MaskRay wrote:
> `-o`
Ok.


================
Comment at: llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp:95
+  const uint32_t PreserveMask =
+      IMAGE_SCN_LNK_INFO | IMAGE_SCN_LNK_COMDAT | IMAGE_SCN_LNK_NRELOC_OVFL |
+      IMAGE_SCN_ALIGN_1BYTES | IMAGE_SCN_ALIGN_2BYTES | IMAGE_SCN_ALIGN_4BYTES |
----------------
MaskRay wrote:
> How do you get this list?
> 
> Have you verified that other flags will be dropped?
Well, just by thinking what should be preserved:) I am not completely sure about the IMAGE_SCN_LNK_INFO, but the other flags from this list I think should be there.


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

https://reviews.llvm.org/D73107





More information about the llvm-commits mailing list