[PATCH] D17265: [lld] [ELF/AArch64] Fix R_AARCH64_ABS64 in Shared mode
Adhemerval Zanella via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 15 05:18:04 PST 2016
zatrazz created this revision.
zatrazz added reviewers: ruiu, rafael.
zatrazz added a subscriber: llvm-commits.
zatrazz set the repository for this revision to rL LLVM.
zatrazz added a project: lld.
Herald added subscribers: rengolin, aemerson.
This patch fixes the R_AARCH64_ABS64 relocation when used in shared mode,
where it requires a dynamic R_AARCH64_RELATIVE relocation. To correct set
the addend on the dynamic relocation (since it will be used by the dynamic
linker), a new TargetInfo specific hook was created (getDynRelativeAddend)
to get the correct addend based on relocation type.
It also lead to some cleanup on powerpc backend by moving the specific
TOC base addend on the target specific code.
The patch fixes the issues when creating shared library code against
{init,fini}_array, where it issues R_AARCH64_ABS64 relocation against
local symbols.
Repository:
rL LLVM
http://reviews.llvm.org/D17265
Files:
ELF/OutputSections.cpp
ELF/OutputSections.h
ELF/Target.cpp
ELF/Target.h
ELF/Writer.cpp
test/ELF/aarch64-abs64-dyn.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17265.47981.patch
Type: text/x-patch
Size: 9722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160215/baabdf9f/attachment.bin>
More information about the llvm-commits
mailing list