aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-08-22 19:00:43 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-12-06 16:30:02 +0000
commit5f7ddb1456d5b926e85710da690bf548ef0c9fc8 (patch)
treef8845b108c5c07836b95c8229c96cd745fc9fb2c /contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp
parent3f82687cdf02983d8f3294df4d97b09cf211141b (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp
index d52c9f92bd1d..736150fdbc0a 100644
--- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp
+++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp
@@ -40,7 +40,8 @@ MCSection *PPC64LinuxTargetObjectFile::SelectSectionForGlobal(
if (Kind.isReadOnly()) {
const auto *GVar = dyn_cast<GlobalVariable>(GO);
- if (GVar && GVar->isConstant() && GVar->getInitializer()->needsRelocation())
+ if (GVar && GVar->isConstant() &&
+ GVar->getInitializer()->needsDynamicRelocation())
Kind = SectionKind::getReadOnlyWithRel();
}