[PATCH] D90438: [llvm-objcopy] Make --set-section-flags work with --add-section

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 00:15:26 PST 2020


jhenderson added a comment.

I think it's unlikely any user is ever going to want to change the flags of .gnu_debuglink. I think there's a slightly higher chance that they might want to for .symtab, which could potentially be added later on. However, I don't see any particular reason to prevent it - in this case, I'd consider GNU's behaviour unhelpful as if somebody has explicitly asked to change the flags of one of these sections, they presumably actually want to and ignoring it is unhelpful. Consequently, where we can //easily// support it, we should (in this case, I believe it's just move the new code even later in the function), but I don't think it's worth doing if it's hard to support.



================
Comment at: llvm/test/tools/llvm-objcopy/ELF/add-section-and-set-flags.test:15
+
+!ELF
+FileHeader:
----------------
It might be a good idea to change this to `--- !ELF` so that other YAML docs could be added in the future, if needed, without needing to change this line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90438



More information about the llvm-commits mailing list