From 77d1cb1ddf359afd6563f7ccd824b139f11f4acf Mon Sep 17 00:00:00 2001 From: George Rimar Date: Tue, 24 Nov 2015 09:00:06 +0000 Subject: [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 --- lld/ELF/InputSection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lld/ELF/InputSection.cpp') 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::relocate( continue; } + if (Target->isTlsOptimized(Type, Body)) { + Target->relocateTlsOptimize(BufLoc, BufEnd, AddrLoc, + getSymVA(Body)); + continue; + } + uintX_t SymVA = getSymVA(Body); if (Target->relocNeedsPlt(Type, Body)) { SymVA = Out::Plt->getEntryAddr(Body); -- cgit v1.2.3