aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/ArchitectureSet.cpp
diff options
context:
space:
mode:
authorStefan Pintilie <stefanp@ca.ibm.com>2021-04-05 08:07:16 -0500
committerStefan Pintilie <stefanp@ca.ibm.com>2021-04-05 09:13:20 -0500
commit660c4e57b4a7ac71f9595f31bfdec114369f4ca0 (patch)
tree7775a7bdb60088be4dfc390440c6e020eee989a2 /llvm/lib/TextAPI/ArchitectureSet.cpp
parent2aebb7cb3c88b1446515563653c821e8165b3aaf (diff)
downloadllvm-660c4e57b4a7ac71f9595f31bfdec114369f4ca0.zip
llvm-660c4e57b4a7ac71f9595f31bfdec114369f4ca0.tar.gz
llvm-660c4e57b4a7ac71f9595f31bfdec114369f4ca0.tar.bz2
[PowerPC] Fix issue where binary uses a .got but is missing a .TOC.
From the PowerPC ELFv2 ABI section 4.2.3. Global Offset Table. ``` The GOT consists of an 8-byte header that contains the TOC base (the first TOC base when multiple TOCs are present), followed by an array of 8-byte addresses. ``` Due to the introduction of PC Relative code it is now possible to require a GOT without having a .TOC. symbol in the object that is being linked. Since LLD uses the .TOC. symbol to determine whether or not a GOT is required the GOT header is not setup correctly and the 8-byte header is missing. This patch allows the Power PC GOT setup to happen when an element is added to the GOT instead of at the very begining. When this header is added a .TOC. symbol is also added. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D91426
Diffstat (limited to 'llvm/lib/TextAPI/ArchitectureSet.cpp')
0 files changed, 0 insertions, 0 deletions