llvm-project/llvm/test/tools/llvm-objcopy
Igor Kudrin 68616584c3 [llvm-objcopy][ELF] Avoid reordering section headers
As for now, llvm-objcopy sorts section headers according to the offsets
of the sections in the input file. That can corrupt section references
in the dynamic symbol table because it is a loadable section and as such
is not updated by the tool. Even though the section references are not
required for loading the binary correctly, they are still handy for a
user who analyzes the file.

While the patch removes global reordering of section headers, it layouts
the sections in the same way as before, i.e. according to their original
offsets. All that helps the output file to resemble the input better.

Note that the patch removes sorting SHT_GROUP sections to the start of
the list, which was introduced in D62620 in order to ensure that they
come before the group members, along with the corresponding test. The
original issue was caused by the sorting of section headers, so dropping
the sorting also resolves the issue.

Differential Revision: https://reviews.llvm.org/D107653
2021-08-12 17:12:09 +07:00
..
COFF [llvm-objcopy] [COFF] Do not patch debug entries if PointerToRawData is zero 2021-08-06 09:23:25 -07:00
ELF [llvm-objcopy][ELF] Avoid reordering section headers 2021-08-12 17:12:09 +07:00
Inputs
MachO [llvm-objcopy][MachO] Ignore all LC_SUB_* commands. 2021-07-28 17:35:26 -07:00
wasm [llvm-strip][WebAssembly] Support strip flags 2021-07-14 14:17:02 -07:00
dash-dash.test [llvm-strip] Add support for '--' for delimiting options from input files 2021-05-20 03:33:51 -07:00
grouped-options.test [test] Use double pound to denote comments. 2021-07-15 17:39:34 -07:00
redefine-symbols.test [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
tool-help-message.test [llvm-strip] Add support for '--' for delimiting options from input files 2021-05-20 03:33:51 -07:00
tool-name.test [llvm-objcopy][MachO] Add llvm-bitcode-strip driver 2020-09-18 18:13:05 -07:00
tool-version.test [llvm-objcopy][MachO] Add llvm-bitcode-strip driver 2020-09-18 18:13:05 -07:00