[llvm-objcopy][COFF] Implement --redefine-sym and --redefine-syms
authorFangrui Song <maskray@google.com>
Sat, 9 Nov 2019 00:19:33 +0000 (16:19 -0800)
committerFangrui Song <maskray@google.com>
Tue, 12 Nov 2019 19:28:00 +0000 (11:28 -0800)
commit7af6025bd12eb086341c3076b760b053a9c2625f
treeae822719e8f4a796a30f97c54d10a580c6b09bc5
parent96915495f9fcbd47bf3f893200e3f5a8e30d0d9e
[llvm-objcopy][COFF] Implement --redefine-sym and --redefine-syms

The parsing error tests in ELF/redefine-symbols.test are not specific to ELF.
Move them to redefine-symbols.test.
Add COFF/redefine-symbols.test for COFF specific tests.

Also fix the documentation regarding --redefine-syms: the old and new
names are separated by whitespace, not an equals sign.

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D70036
llvm/docs/CommandGuide/llvm-objcopy.rst
llvm/test/tools/llvm-objcopy/COFF/redefine-symbol.test [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/ELF/redefine-symbol.test
llvm/test/tools/llvm-objcopy/redefine-symbols.test [new file with mode: 0644]
llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp