SuccessChanges

Summary

  1. [llvm-objcopy][MachO] Implement a layout algorithm for executables (details)
  2. [X86] Teach lower1BitShuffle to match right shifts with upper zero (details)
  3. [MC] Don't emit .symver redirected symbols to the symbol table (details)
Commit dee9546b8f8386223769e96becc2e24ddcc39de7 by nuta
[llvm-objcopy][MachO] Implement a layout algorithm for executables
Summary: The layout algorithm for relocatable objects and for executable
are somewhat different. This patch implements the latter one based on
the algorithm in LLD (MachOFileLayout).
Reviewers: alexshap, rupprecht, jhenderson
Reviewed By: alexshap
Subscribers: jakehehrlich, abrachet, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65539
llvm-svn: 369231
The file was addedllvm/test/tools/llvm-objcopy/MachO/basic-executable-copy.test
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp (diff)
Commit ebb7ddc6330b28b8c7e53d4c68d3684c127a41c1 by craig.topper
[X86] Teach lower1BitShuffle to match right shifts with upper zero
elements on types that don't natively support KSHIFT.
We can support these by widening to a supported type, then shifting all
the way to the left and then back to the right to ensure that we shift
in zeroes.
llvm-svn: 369232
The file was modifiedllvm/test/CodeGen/X86/kshift.ll (diff)
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
Commit 38426c114f6e50f8638bdd656f2f423151bc8eca by maskray
[MC] Don't emit .symver redirected symbols to the symbol table
GNU as keeps the original symbol in the symbol table for defined @ and
@@, but suppresses it in other cases (@@@ or undefined). The original
symbol is usually undesired: In a shared object, the original symbol can
be localized with a version script, but it is hard to remove/localize in
an archive:
1) a post-processing step removes the undesired original symbol 2)
consumers (executable) of the archive are built with the
  version script
Moreover, it can cause linker issues like binutils PR/18703 if the
original symbol name and the base name of the versioned symbol is the
same (both ld.bfd and gold have some code to work around defined @ and
@@). In lld, if it sees f and f@v1:
  --version-script =(printf 'v1 {};') => f and f@v1
--version-script =(printf 'v1 { f; };') => f@v1 and f@@v1
It can be argued that @@@ added on 2000-11-13 corrected the @ and @@
mistake.
This patch catches some more multiple version errors (defined @ and @@),
and consistently suppress the original symbol. This addresses all the
problems listed above.
If the user wants other aliases to the versioned symbol, they can copy
the original symbol to other symbol names with .set directive, e.g.
    .symver f, f@v1  # emit f@v1 but not f into .symtab
   .set f_impl, f   # emit f_impl into .symtab
llvm-svn: 369233
The file was removedllvm/test/MC/ELF/multiple-different-symver.s
The file was modifiedllvm/test/MC/PowerPC/ppc64-localentry-symbols.s (diff)
The file was modifiedllvm/test/MC/ARM/arm-elf-symver.s (diff)
The file was addedllvm/test/MC/ELF/symver-multiple-version.s
The file was modifiedllvm/test/LTO/X86/symver-asm2.ll (diff)
The file was modifiedllvm/test/MC/ELF/symver.s (diff)
The file was modifiedllvm/test/LTO/X86/symver-asm.ll (diff)
The file was modifiedllvm/lib/MC/ELFObjectWriter.cpp (diff)