[llvm-objcopy] [COFF] Consider section flags when adding section
authorAlfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
Wed, 25 Aug 2021 20:03:32 +0000 (23:03 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 25 Aug 2021 20:11:41 +0000 (23:11 +0300)
commitcdd407286a9652ec62b33f437a298754fe3ba7ab
tree2354df8e5a0ef6d60f1f440df5894f3fbb5d3946
parent097925aab9cac3c381fd94e2e03733fdaf21f897
[llvm-objcopy] [COFF] Consider section flags when adding section

The --set-section-flags option was being ignored when adding a new
section. Take it into account if present.

Fixes https://llvm.org/PR51244

Reviewed By: jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D106942
llvm/test/tools/llvm-objcopy/COFF/add-section-and-set-flags.test [new file with mode: 0644]
llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp