summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Arch/PPC64.cpp
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2019-02-12 15:35:49 +0000
committerSean Fertile <sfertile@ca.ibm.com>2019-02-12 15:35:49 +0000
commitd694160e665eb3cefc93a07af8232aec0b7d2410 (patch)
tree67f22df3db4d2681b33dc6163f484f9097c8023b /lld/ELF/Arch/PPC64.cpp
parenta1805540205b9852117fa54716a54940c2af465d (diff)
downloadbcm5719-llvm-d694160e665eb3cefc93a07af8232aec0b7d2410.tar.gz
bcm5719-llvm-d694160e665eb3cefc93a07af8232aec0b7d2410.zip
[PPC64] Sort .toc sections accessed with small code model relocs.
A follow up to the intial patch that unblocked linking against libgcc. For lld we don't need to bother tracking which objects have got based small code model relocations. This is due to the fact that the compilers on powerpc64 use the .toc section to generate indirections to symbols (rather then using got relocations) which keeps the got small. This makes overflowing a small code model got relocation very unlikely. Differential Revision: https://reviews.llvm.org/D57245 llvm-svn: 353849
Diffstat (limited to 'lld/ELF/Arch/PPC64.cpp')
-rw-r--r--lld/ELF/Arch/PPC64.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp
index c40c9787896..4f5aa45aac6 100644
--- a/lld/ELF/Arch/PPC64.cpp
+++ b/lld/ELF/Arch/PPC64.cpp
@@ -98,13 +98,9 @@ unsigned elf::getPPC64GlobalEntryToLocalEntryOffset(uint8_t StOther) {
return 0;
}
-bool elf::isPPC64SmallCodeModelReloc(RelType Type) {
- // List is not yet complete, at the very least the got based tls related
- // relocations need to be added, and we need to determine how the section
- // sorting interacts with the thread pointer and dynamic thread pointer
- // relative tls relocations.
- return Type == R_PPC64_GOT16 || Type == R_PPC64_TOC16 ||
- Type == R_PPC64_TOC16_DS;
+bool elf::isPPC64SmallCodeModelTocReloc(RelType Type) {
+ // The only small code model relocations that access the .toc section.
+ return Type == R_PPC64_TOC16 || Type == R_PPC64_TOC16_DS;
}
namespace {
OpenPOWER on IntegriCloud