Files
llvm/test/CodeGen/PowerPC
Fangrui Song f6351ee964 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370426 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 02:20:49 +00:00
..
2018-09-07 07:56:05 +00:00
2019-05-14 03:11:24 +00:00
2019-04-29 23:25:33 +00:00
2019-03-29 17:35:56 +00:00
2017-10-10 08:46:10 +00:00
2018-12-19 15:21:07 +00:00
2019-06-17 09:13:29 +00:00
2019-06-17 09:13:29 +00:00
2019-06-17 09:13:29 +00:00
2019-08-29 19:01:23 +00:00
2017-01-22 20:28:56 +00:00
2019-08-23 19:04:47 +00:00