[llvm-objcopy] Preserve ARM and AArch64 mapping symbols
authorIgor Kudrin <ikudrin@accesssoftek.com>
Wed, 19 Jan 2022 07:41:21 +0000 (14:41 +0700)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Wed, 19 Jan 2022 07:41:21 +0000 (14:41 +0700)
commitf3471dc517696b3dcd9a3f3c2c0642dfff499776
tree0c1318cdd6360e228f64048c1e09ad131d06d62d
parent288082d45d6124a7f818f6a44feec7780fbc4c52
[llvm-objcopy] Preserve ARM and AArch64 mapping symbols

Mapping symbols are required by ARM/AArch64 ELF ABI. They help to
disassemble files correctly and are also used in linkers. Nonetheless,
for executable files, the symbols can be stripped to better resemble
the behavior of GNU's objcopy.

Differential Revision: https://reviews.llvm.org/D117233
llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-aarch64.test [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-arm.test [new file with mode: 0644]
llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp