[llvm] r344080 - [llvm-objcopy] Make -S an alias for --strip-all

Jake Ehrlich via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 14:14:09 PDT 2018


Author: jakehehrlich
Date: Tue Oct  9 14:14:09 2018
New Revision: 344080

URL: http://llvm.org/viewvc/llvm-project?rev=344080&view=rev
Log:
[llvm-objcopy] Make -S an alias for --strip-all

-S should be an alias for --strip-all not --strip-all-gnu

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

Modified: llvm/trunk/test/tools/llvm-objcopy/strip-all-gnu.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/strip-all-gnu.test?rev=344080&r1=344079&r2=344080&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objcopy/strip-all-gnu.test (original)
+++ llvm/trunk/test/tools/llvm-objcopy/strip-all-gnu.test Tue Oct  9 14:14:09 2018
@@ -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:

Modified: llvm/trunk/test/tools/llvm-objcopy/strip-all.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/strip-all.test?rev=344080&r1=344079&r2=344080&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objcopy/strip-all.test (original)
+++ llvm/trunk/test/tools/llvm-objcopy/strip-all.test Tue Oct  9 14:14:09 2018
@@ -35,6 +35,10 @@
 # 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

Modified: llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td?rev=344080&r1=344079&r2=344080&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td (original)
+++ llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td Tue Oct  9 14:14:09 2018
@@ -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">,




More information about the llvm-commits mailing list