[PATCH] D41541: [ELF] - Allow using PLT relocations when "-z notext" is given.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 22 03:47:17 PST 2017
grimar created this revision.
grimar added reviewers: ruiu, rafael.
This is PR35720.
Currently LLD allows dynamic relocations against text when -z notext is given.
Though for non-PIC relocations like R_X86_64_PC32 that does not work,
we produce "relocation R_X86_64_PC32 cannot be used against shared object;"
error because they may overflow in runtime.
Solution implemented is to use PLT for them.
https://reviews.llvm.org/D41541
Files:
ELF/Relocations.cpp
test/ELF/Inputs/znotext-plt-relocations.s
test/ELF/znotext-plt-relocations.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41541.128009.patch
Type: text/x-patch
Size: 4996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171222/ee1bc081/attachment.bin>
More information about the llvm-commits
mailing list