llvm/test/tools
Peter Collingbourne 44e7cf45f6 llvm-objcopy: Set sh_link to 0 on unrecognized symtab-linked sections.
Per discussion on the generic-abi mailing list:
https://groups.google.com/forum/#!topic/generic-abi/MPr8TVtnVn4

An object file manipulation tool must either write out a symbol
table with the same number of entries as the original symbol table
and in the same order, or if this is impossible, refuse to operate
on the object file if it has unrecognized sections that are linked
to the symtab section. However, existing tools (namely GNU strip,
GNU objcopy and ld.{bfd,gold,lld} -r) do not comply with this at
present: they change symbol table indexes and set sh_link to 0 on
the unrecognized symtab-linked sections.

We intend to use the latter as a (temporary) signal that a tool has
operated on a proposed new symtab-linked section and invalidated the
symbol table indexes. However, llvm-objcopy currently keeps sh_link
pointing to the new symtab section. This patch changes llvm-objcopy
to set sh_link to 0 to match the behaviour of the other tools.

Differential Revision: https://reviews.llvm.org/D47404

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333581 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-30 19:30:39 +00:00
..
dsymutil [dsymutil] Escape HTML special characters in plist. 2018-05-30 17:47:11 +00:00
gold LTO: Replace split dwarf implementation that uses objcopy with one that uses direct emission. 2018-05-21 20:26:49 +00:00
llvm-ar [llvm-ar] Temporarily make the tool case detection test Windows-only to fix the build (introduced in r329658) 2018-04-10 10:26:23 +00:00
llvm-cfi-verify/X86
llvm-config
llvm-cov [Coverage] Take filenames into account when loading function records. 2018-05-08 19:26:51 +00:00
llvm-cvtres [llvm-cvtres] Allow parameters preceded by '-' in addition to '/' 2018-05-02 21:15:13 +00:00
llvm-cxxdump
llvm-cxxfilt
llvm-diff Let llvm-diff correctly deal with Undef/ConstantAggregateZero/ConstantVector/IndirectBr 2018-04-12 21:28:04 +00:00
llvm-dlltool [COFF] Improve correctness of def parsing for GNU features 2018-05-09 09:21:53 +00:00
llvm-dwarfdump [dwarfdump] Make -c and -p work together 2018-05-26 19:39:56 +00:00
llvm-dwp
llvm-extract
llvm-isel-fuzzer
llvm-lib
llvm-lit
llvm-lto
llvm-lto2 Fix test by allowing it to accept an upper or lower case letter as the first character. 2018-04-20 15:23:57 +00:00
llvm-mc
llvm-mca [X86][Sched] Add InstRW for CLC on Intel after SNB. 2018-05-29 06:19:39 +00:00
llvm-modextract
llvm-mt
llvm-nm [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
llvm-objcopy llvm-objcopy: Set sh_link to 0 on unrecognized symtab-linked sections. 2018-05-30 19:30:39 +00:00
llvm-objdump [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
llvm-opt-fuzzer
llvm-opt-report
llvm-pdbdump win: try to fix dia tests with newer msvc versions 2018-05-21 02:09:57 +00:00
llvm-profdata
llvm-rc [llvm-rc] Add support for the optional CLASS statement for dialogs 2018-05-15 19:21:28 +00:00
llvm-readobj Reverted r333424 as it broke multiple build bots and left unfixed for a long time 2018-05-30 18:51:08 +00:00
llvm-size
llvm-split
llvm-strings
llvm-symbolizer [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
llvm-xray/X86
lto
obj2yaml
opt-viewer
sancov
sanstats
yaml2obj