llvm-project/llvm/tools/llvm-objcopy
Igor Kudrin 7b424b9333 [llvm-objcopy] Rename relocation sections together with their targets.
As for now, llvm-objcopy renames only sections that are specified
explicitly in --rename-section, while GNU objcopy keeps names of
relocation sections in sync with their targets. For example:

> readelf -S test.o
...
  [ 1] .foo      PROGBITS
  [ 2] .rela.foo RELA

> objcopy --rename-section .foo=.bar test.o gnu.o
> readelf -S gnu.o
...
  [ 1] .bar      PROGBITS
  [ 2] .rela.bar RELA

> llvm-objcopy --rename-section .foo=.bar test.o llvm.o
> readelf -S llvm.o
...
  [ 1] .bar      PROGBITS
  [ 2] .rela.foo RELA

This patch makes llvm-objcopy to match the behavior of GNU objcopy better.

Differential Revision: https://reviews.llvm.org/D110352
2021-09-29 16:36:37 +07:00
..
COFF [llvm-objcopy][COFF] Fix test for debug dir presence 2021-09-10 09:57:18 +01:00
ELF [llvm-objcopy] Rename relocation sections together with their targets. 2021-09-29 16:36:37 +07:00
MachO [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options. 2021-09-08 19:16:38 +03:00
wasm [llvm-strip][WebAssembly] Support strip flags 2021-07-14 14:17:02 -07:00
BitcodeStripOpts.td [llvm-objcopy][MachO] Add llvm-bitcode-strip driver 2020-09-18 18:13:05 -07:00
CMakeLists.txt [llvm-objcopy] Refactor CopyConfig structure. 2021-05-20 13:14:51 +03:00
CommonConfig.h [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options. 2021-09-08 19:16:38 +03:00
CommonOpts.td [llvm-objcopy][MachO] Add support for --keep-undefined 2021-03-08 18:57:25 -08:00
ConfigManager.cpp [llvm-objcopy][NFC] Refactor CopyConfig structure - categorize options. 2021-09-08 19:16:38 +03:00
ConfigManager.h [llvm-objcopy][NFC] Refactor CopyConfig structure - remove lazy options processing. 2021-05-31 14:40:27 +03:00
InstallNameToolOpts.td [llvm-install-name-tool] Add -prepend_rpath option 2020-10-23 15:01:03 -07:00
MultiFormatConfig.h [llvm-objcopy] Refactor CopyConfig structure. 2021-05-20 13:14:51 +03:00
ObjcopyOpts.td [llvm-objcopy][docs] Add missing options to the help output and the command guide 2021-09-24 09:44:46 +01:00
StripOpts.td [llvm-objcopy][MachO] Add support for removing Swift symbols 2020-05-26 16:49:56 -07:00
llvm-objcopy.cpp [llvm] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
llvm-objcopy.h [llvm-objcopy] Refactor CopyConfig structure. 2021-05-20 13:14:51 +03:00