summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputSection.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2015-11-24 09:00:06 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2015-11-24 09:00:06 +0000
commit77d1cb1ddf359afd6563f7ccd824b139f11f4acf (patch)
tree9e3c9bc9b2b3786d68fbc13a9ba5fe6a0cd5eeda /lld/ELF/InputSection.cpp
parent1938f2eb9832978952f6a6397a5ad40c6338ed6e (diff)
downloadbcm5719-llvm-77d1cb1ddf359afd6563f7ccd824b139f11f4acf.tar.gz
bcm5719-llvm-77d1cb1ddf359afd6563f7ccd824b139f11f4acf.zip
[ELF2] - Optimization for R_X86_64_GOTTPOFF relocation.
R_X86_64_GOTTPOFF is not always requires GOT entries. Some relocations can be converted to local ones. Differential revision: http://reviews.llvm.org/D14713 llvm-svn: 253966
Diffstat (limited to 'lld/ELF/InputSection.cpp')
-rw-r--r--lld/ELF/InputSection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 15485b4f6d2..1098105c50d 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -134,6 +134,12 @@ void InputSectionBase<ELFT>::relocate(
continue;
}
+ if (Target->isTlsOptimized(Type, Body)) {
+ Target->relocateTlsOptimize(BufLoc, BufEnd, AddrLoc,
+ getSymVA<ELFT>(Body));
+ continue;
+ }
+
uintX_t SymVA = getSymVA<ELFT>(Body);
if (Target->relocNeedsPlt(Type, Body)) {
SymVA = Out<ELFT>::Plt->getEntryAddr(Body);
OpenPOWER on IntegriCloud