Index: llvm/trunk/test/tools/llvm-objcopy/ELF/strip-debug.test =================================================================== --- llvm/trunk/test/tools/llvm-objcopy/ELF/strip-debug.test +++ llvm/trunk/test/tools/llvm-objcopy/ELF/strip-debug.test @@ -6,6 +6,10 @@ # Verify that the previous run of llvm-objcopy has not modified the input. # RUN: cmp %t %t3 +# RUN: llvm-objcopy -g %t %t2g +# Verify that --strip-debug and -g produce the same output +# RUN: cmp %t2 %t2g + # RUN: llvm-strip --strip-debug %t3 # RUN: cmp %t2 %t3 Index: llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td =================================================================== --- llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td +++ llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td @@ -95,6 +95,8 @@ HelpText<"Compatible with GNU objcopy's --strip-all">; def strip_debug : Flag<["-", "--"], "strip-debug">, HelpText<"Remove all debug information">; +def g : Flag<["-"], "g">, Alias, + HelpText<"Alias for --strip-debug">; def strip_dwo : Flag<["-", "--"], "strip-dwo">, HelpText<"Remove all DWARF .dwo sections from file">; def strip_sections : Flag<["-", "--"], "strip-sections">,