[PATCH] D67090: [llvm-objcopy][llvm-strip] Support --only-keep-debug
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 02:02:22 PDT 2019
grimar added inline comments.
================
Comment at: test/tools/llvm-objcopy/ELF/only-keep-debug.test:28
+
+## Contents of SHT_NOTE and .debug* are kept.
+
----------------
Perhaps not '.debug_*', but all non-alloc sections (looking at the logic implemented)?
What about adding non-alloc section that is not '.debug_*' to the test?
================
Comment at: test/tools/llvm-objcopy/ELF/only-keep-debug.test:79
+Symbols:
+ - Name: foo
+ProgramHeaders:
----------------
Do you need symbol?
================
Comment at: tools/llvm-objcopy/ELF/ELFObjcopy.cpp:486
+ if (Config.OnlyKeepDebug)
+ for (auto &Sec : Obj.sections())
+ if (Sec.Flags & SHF_ALLOC && Sec.Type != SHT_NOTE)
----------------
Avoid auto?
================
Comment at: tools/llvm-objcopy/ELF/Object.cpp:1935
+ uint32_t Index = 1;
+ for (auto &Sec : Obj.sections()) {
+ Sec.Index = Index++;
----------------
Don't use auto?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67090/new/
https://reviews.llvm.org/D67090
More information about the llvm-commits
mailing list