[PATCH] D65995: [ELF] Don't special case symbolic relocations with 0 addend to ifunc in writable locations
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 23:41:57 PDT 2019
MaskRay created this revision.
MaskRay added reviewers: grimar, luporl, pcc, peter.smith, ruiu, sfertile.
Herald added subscribers: llvm-commits, jsji, kbarton, arichardson, javed.absar, nemanjai, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
Currently the following 3 relocation types do not trigger the creation
of a canonical PLT:
1. GOT-generating
2. PLT-generating
3. symbolic relocation with 0 addend in a writable location
3. is used for ifunc function pointers in .data and .toc.
This patch deletes case 3) to simplify the R_*_IRELATIVE generating
logic added in D57371 <https://reviews.llvm.org/D57371>. Other advantages:
- It is guaranteed no more than 1 R_*_IRELATIVE is created for an ifunc.
- PPC64: no need to special case ifunc in toc-indirect to toc-relative relaxation. See D65755 <https://reviews.llvm.org/D65755>
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D65995
Files:
ELF/Arch/PPC64.cpp
ELF/Relocations.cpp
ELF/Writer.cpp
test/ELF/aarch64-gnu-ifunc-nonpreemptable2.s
test/ELF/gnu-ifunc-canon.s
test/ELF/ppc64-toc-relax-ifunc.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65995.214311.patch
Type: text/x-patch
Size: 8376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190809/d3f636b3/attachment.bin>
More information about the llvm-commits
mailing list