[PATCH] D153262: [llvm-objcopy] --set-section-flags: allow "large" to add SHF_X86_64_LARGE

Thomas Köppe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 02:29:37 PDT 2023


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


================
Comment at: llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp:96-97
 
-static uint64_t getSectionFlagsPreserveMask(uint64_t OldFlags,
-                                            uint64_t NewFlags) {
+static uint64_t getSectionFlagsPreserveMask(
+    uint64_t OldFlags, uint64_t NewFlags, uint16_t EMachine) {
   // Preserve some flags which should not be dropped when setting flags.
----------------
jhenderson wrote:
> When I run my local clang-format on this code, I get the inline edit.
Aha, I see! With my original format, clang-format makes no changes. But if I make a local edit to put everything on a single line and _then_ run clang-format, then it produces your version.

It seems like both versions are acceptable to clang-format, but if it needs to make a change, it prefers your version?


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

https://reviews.llvm.org/D153262



More information about the llvm-commits mailing list