[PATCH] D57371: [wip] ELF: Allow GOT relocs pointing to non-preemptable ifunc to resolve to an IRELATIVE where possible.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 28 22:09:23 PST 2019
pcc created this revision.
pcc added reviewers: peter.smith, grimar, ruiu.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.
Non-GOT non-PLT relocations to non-preemptible ifuncs result in the
creation of a canonical PLT, which now takes the identity of the IFUNC
in the symbol table. This (a) ensures address consistency inside and
outside the module, and (b) fixes a bug where some of these relocations
end up pointing to the resolver.
Fixes (at least) PR40474 and PR40501.
TODO:
- Fix tests.
- Maybe look at some of the FIXMEs. The one about turning absolute relocations into IRELATIVEs would avoid an indirection in common cases and match bfd/gold's behaviour for the repro in PR40501.
Repository:
rL LLVM
https://reviews.llvm.org/D57371
Files:
lld/ELF/InputSection.cpp
lld/ELF/Relocations.cpp
lld/ELF/Relocations.h
lld/ELF/Symbols.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57371.184016.patch
Type: text/x-patch
Size: 9746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190129/267d8ae6/attachment.bin>
More information about the llvm-commits
mailing list