[ELF] Rename .plt to .iplt and decrease EM_PPC{,64} alignment of .glink to 4
authorFangrui Song <maskray@google.com>
Sun, 15 Dec 2019 00:19:03 +0000 (16:19 -0800)
committerFangrui Song <maskray@google.com>
Tue, 17 Dec 2019 08:15:59 +0000 (00:15 -0800)
commit345f59667d846c4b77258e72c902f4aaf8add166
tree4d8a7e1aef2801b85dcf0f88b2baaa52ff391253
parentba6f25d7d3671f8ff1d072a43a292950dbbf899e
[ELF] Rename .plt to .iplt and decrease EM_PPC{,64} alignment of .glink to 4

GNU ld creates the synthetic section .iplt, and has a built-in linker
script that assigns .iplt to the output section .plt . There is no
output section named .iplt .

Making .iplt an output section actually has a benefit that makes the
tricky toolchain feature stand out. Symbolizers don't have to deal with
mixed PLT entries (e.g. llvm-objdump -d incorrectly annotates such jump
targets).

On EM_PPC{,64}, .glink contains a PLT resolver and a series of jump
instructions. The 4-byte entry size makes it unnecessary to have an
alignment of 16.

Mark ppc32-gnu-ifunc.s and ppc32-gnu-ifunc-nonpreemptable.s as `XFAIL: *`.
They test IPLT on EM_PPC, which never works.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D71520
21 files changed:
lld/ELF/SyntheticSections.cpp
lld/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s
lld/test/ELF/aarch64-gnu-ifunc-plt.s
lld/test/ELF/aarch64-gnu-ifunc.s
lld/test/ELF/aarch64-gnu-ifunc2.s
lld/test/ELF/aarch64-ifunc-bti.s
lld/test/ELF/arm-gnu-ifunc.s
lld/test/ELF/gnu-ifunc-canon.s
lld/test/ELF/gnu-ifunc-i386.s
lld/test/ELF/gnu-ifunc-plt-i386.s
lld/test/ELF/gnu-ifunc-plt.s
lld/test/ELF/gnu-ifunc-shared.s
lld/test/ELF/gnu-ifunc.s
lld/test/ELF/linkerscript/orphan-report.s
lld/test/ELF/ppc32-call-stub-pic.s
lld/test/ELF/ppc32-gnu-ifunc-nonpreemptable.s
lld/test/ELF/ppc32-gnu-ifunc.s
lld/test/ELF/ppc32-tls-gd.s
lld/test/ELF/ppc32-tls-ld.s
lld/test/ELF/ppc64-dtprel.s
lld/test/ELF/ppc64-toc-relax-ifunc.s