OSDN Git Service

[llvm-objcopy] Make -S an alias for --strip-all
authorJake Ehrlich <jakehehrlich@google.com>
Tue, 9 Oct 2018 21:14:09 +0000 (21:14 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Tue, 9 Oct 2018 21:14:09 +0000 (21:14 +0000)
-S should be an alias for --strip-all not --strip-all-gnu

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344080 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-objcopy/strip-all-gnu.test
test/tools/llvm-objcopy/strip-all.test
tools/llvm-objcopy/ObjcopyOpts.td

index 7e3b5ce..15e2005 100644 (file)
@@ -2,8 +2,6 @@
 # RUN: cp %t %t1
 # RUN: llvm-objcopy --strip-all-gnu %t %t2
 # RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s
-# RUN: llvm-objcopy -S %t1 %t3
-# RUN: cmp %t2 %t3
 
 !ELF
 FileHeader:
index bc01835..8c0f748 100644 (file)
 # RUN: llvm-strip --strip-all %t8
 # RUN: cmp %t2 %t8
 
+# RUN: cp %t %t9
+# RUN: llvm-objcopy -S %t9 %t9
+# RUN: cmp %t2 %t9
+
 # Verify that a non-existent symbol table (after first call to llvm-strip)
 # can be handled correctly.
 # RUN: cp %t %t9
index 3a3c82c..18b270b 100644 (file)
@@ -67,10 +67,10 @@ defm add_section : Eq<"add-section">,
                    HelpText<"Make a section named <section> with the contents of <file>.">;
 def strip_all : Flag<["-", "--"], "strip-all">,
                 HelpText<"Remove non-allocated sections other than .gnu.warning* sections">;
+def S : Flag<["-"], "S">,
+        Alias<strip_all>;
 def strip_all_gnu : Flag<["-", "--"], "strip-all-gnu">,
                     HelpText<"Compaitable with GNU objcopy's --strip-all">;
-def S : Flag<["-"], "S">,
-        Alias<strip_all_gnu>;
 def strip_debug : Flag<["-", "--"], "strip-debug">,
                   HelpText<"Remove all debug information">;
 def strip_dwo : Flag<["-", "--"], "strip-dwo">,