[PATCH] D60189: [llvm-objcopy] Simplify SHT_NOBITS -> SHT_PROGBITS promotion
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 4 06:37:28 PDT 2019
jhenderson added a comment.
I don't feel strongly about this change either way. I think it is correct in the sense that it does what it sets out to achieve, but I have no opinion on whether we should aim for compatibility here. I do agree that non-alloc nobits sections makes no sense, but could there be a crazy build system where somebody modifies the flags in different runs, relying on the later run to add the SHF_ALLOC section?
================
Comment at: tools/llvm-objcopy/ELF/ELFObjcopy.cpp:104
+ // may promote more non-ALLOC sections than GNU objcopy, but it is fine as
+ // non-ALLOC SHT_NOBITS do not make much sense.
+ if (Sec.Type == SHT_NOBITS &&
----------------
I'd put "sections" between "SHT_NOBITS" and "do" here.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60189/new/
https://reviews.llvm.org/D60189
More information about the llvm-commits
mailing list