freebsd-skq/contrib/llvm/lib
Dimitry Andric 617ea2e6c8 Pull in r370426 from upstream llvm trunk (by Fāng-ruì Sòng):
[PPC32] Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO

  Unlike ppc64, which has ADDISgotTprelHA+LDgotTprelL pairs, ppc32 just
  uses LDgotTprelL32, so it does not make lots of sense to use _LO
  without a paired _HA.

  Emit R_PPC_GOT_TPREL16 instead R_PPC_GOT_TPREL16_LO to match GCC, and
  get better linker relocation check. Note, R_PPC_GOT_TPREL16_{HA,LO}
  don't have good linker support:

  (a) lld does not support R_PPC_GOT_TPREL16_{HA,LO}.
  (b) Top of tree ld.bfd does not support R_PPC_GOT_REL16_HA
      Initial-Exec -> Local-Exec relaxation:

    // a.o
    addis 3, 3, tsd_tls@got@tprel@ha
    lwz 3, tsd_tls@got@tprel@l(3)
    add 3, 3, tsd_tls@tls
    // b.o
    .section .tdata,"awT"; .globl tsd_tls; tsd_tls:

    // ld/ld-new a.o b.o
    internal error, aborting at ../../bfd/elf32-ppc.c:7952 in
    ppc_elf_relocate_section

  Reviewed By: adalava

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

This allows use of LLD for linking 32-bit static binaries on
FreeBSD/powerpc.

Submitted by:	Alfredo Dal'Ava Júnior <alfredo.junior@eldorado.org.br>
2019-09-07 12:23:57 +00:00
..
Analysis Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp 2019-09-02 17:55:39 +00:00
AsmParser Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
BinaryFormat Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Bitcode Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Bitstream/Reader Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
CodeGen Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp 2019-09-02 17:32:57 +00:00
DebugInfo Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Demangle Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
ExecutionEngine Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
FuzzMutate Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
IR Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp 2019-09-02 17:55:39 +00:00
IRReader Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
LineEditor Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Linker Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
LTO Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
MC Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp 2019-09-02 17:32:57 +00:00
MCA Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Object Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp 2019-09-02 17:32:57 +00:00
ObjectYAML Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Option Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Passes Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
ProfileData Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Remarks Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Support Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp 2019-09-02 17:32:57 +00:00
TableGen Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Target Pull in r370426 from upstream llvm trunk (by Fāng-ruì Sòng): 2019-09-07 12:23:57 +00:00
Testing/Support Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
TextAPI Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
ToolDrivers Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
Transforms Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmp 2019-09-02 17:55:39 +00:00
WindowsManifest Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00
XRay Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist. 2019-08-21 18:13:02 +00:00