Index: llvm/test/tools/llvm-objcopy/strip-all-gnu.test =================================================================== --- llvm/test/tools/llvm-objcopy/strip-all-gnu.test +++ llvm/test/tools/llvm-objcopy/strip-all-gnu.test @@ -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: llvm/test/tools/llvm-objcopy/strip-all.test =================================================================== --- llvm/test/tools/llvm-objcopy/strip-all.test +++ llvm/test/tools/llvm-objcopy/strip-all.test @@ -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 Index: llvm/tools/llvm-objcopy/ObjcopyOpts.td =================================================================== --- llvm/tools/llvm-objcopy/ObjcopyOpts.td +++ llvm/tools/llvm-objcopy/ObjcopyOpts.td @@ -65,10 +65,10 @@ HelpText<"Make a section named
with the contents of .">; def strip_all : Flag<["-", "--"], "strip-all">, HelpText<"Remove non-allocated sections other than .gnu.warning* sections">; +def S : Flag<["-"], "S">, + Alias; def strip_all_gnu : Flag<["-", "--"], "strip-all-gnu">, HelpText<"Compaitable with GNU objcopy's --strip-all">; -def S : Flag<["-"], "S">, - Alias; def strip_debug : Flag<["-", "--"], "strip-debug">, HelpText<"Remove all debug information">; def strip_dwo : Flag<["-", "--"], "strip-dwo">,