llvm/test
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
..
Analysis [AliasSet] Teach the alias set how to handle atomic memcpy/memmove/memset 2018-05-30 14:43:39 +00:00
Assembler
Bindings
Bitcode
BugPoint
CodeGen [X86] Update the fast-isel tests for _mm_rcp_ss, _mm_rsqrt_ss, and _mm_sqrt_ss to match clang codegen after r333572. 2018-05-30 18:30:44 +00:00
DebugInfo Update CodeView register names in a test that was missed in r333421. 2018-05-29 19:21:22 +00:00
Examples
ExecutionEngine [PowerPC] fix broken JIT-compiled code with tail call optimization 2018-05-30 04:48:29 +00:00
Feature
FileCheck
Instrumentation
Integer
JitListener
Linker
LTO
MC [mips] Correct the predicates of arithmetic and logic instructions. 2018-05-30 11:33:35 +00:00
Object Fix use of echo command in test script 2018-05-30 03:26:28 +00:00
ObjectYAML
Other [PM/LoopUnswitch] When using the new SimpleLoopUnswitch pass, schedule 2018-05-30 02:46:45 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen
ThinLTO/X86
tools llvm-objcopy: Set sh_link to 0 on unrecognized symtab-linked sections. 2018-05-30 19:30:39 +00:00
Transforms [ValueTracking] Fix endless recursion in isKnownNonZero() 2018-05-30 15:56:46 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py
lit.site.cfg.py.in
TestRunner.sh