aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2019-01-23 21:04:03 +0000
committerSean Fertile <sfertile@ca.ibm.com>2019-01-23 21:04:03 +0000
commita010cf615a0b83b2e2511eeb94a46f8c5c0370e1 (patch)
tree8ed05ac796ec27857a58e8eeb2673dd6f62d580f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent92602e26049fc4b7599d9348041038c94728ff6d (diff)
downloadllvm-a010cf615a0b83b2e2511eeb94a46f8c5c0370e1.zip
llvm-a010cf615a0b83b2e2511eeb94a46f8c5c0370e1.tar.gz
llvm-a010cf615a0b83b2e2511eeb94a46f8c5c0370e1.tar.bz2
[PPC64] Sort .toc sections accessed with small code model relocs close to .got.
Small code model global variable access on PPC64 has a very limited range of addressing. The instructions the relocations are used on add an offset in the range [-0x8000, 0x7FFC] to the toc pointer which points to .got +0x8000, giving an addressable range of [.got, .got + 0xFFFC]. While user code can be recompiled with medium and large code models when the binary grows too large for small code model, there are small code model relocations in the crt files and libgcc.a which are typically shipped with the distros, and the ABI dictates that linkers must allow linking of relocatable object files using different code models. To minimze the chance of relocation overflow, any file that contains a small code model relocation should have its .toc section placed closer to the .got then any .toc from a file without small code model relocations. Differential Revision: https://reviews.llvm.org/D56920 llvm-svn: 351978
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions