[PATCH] D46341: [llvm-objcopy] Add --discard-all (-x) option

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 2 01:51:31 PDT 2018


jhenderson added inline comments.


================
Comment at: test/tools/llvm-objcopy/discard-all.test:2
+# RUN: yaml2obj %s > %t
+# RUN: llvm-objcopy --discard-all %t %t2
+# RUN: llvm-readobj -symbols %t2 | FileCheck %s
----------------
Could you extend this test to check that -x works the same as --discard-all, please.


================
Comment at: test/tools/llvm-objcopy/discard-all.test:25
+      Size:     8
+    - Name:     LocalSection
+      Type:     STT_SECTION
----------------
Please define this symbol in a section.


================
Comment at: tools/llvm-objcopy/Opts.td:76
+def discard_all : Flag<["-", "--"], "discard-all">,
+                      HelpText<"Remove all non-global symbols">;
+def x : Flag<["-"], "x">,
----------------
I know this is what gnu objcopy says, but non-global means not STB_GLOBAL to me, but it doesn't affect some other symbol types either (i.e. STB_WEAK, STT_FILE, STT_SECTION). Could you change the help text to match what it actually does, please.


Repository:
  rL LLVM

https://reviews.llvm.org/D46341





More information about the llvm-commits mailing list