summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorDmitry Mikulin <dmitry.mikulin@sony.com>2019-10-15 18:31:10 +0000
committerDmitry Mikulin <dmitry.mikulin@sony.com>2019-10-15 18:31:10 +0000
commitf14642f2f185f9af290f9fcace4851adbbe16432 (patch)
tree023054e847f2845c009d66e9e3e88ad11872fe41 /llvm/lib/Target/TargetLoweringObjectFile.cpp
parent2cb27072cefb11d5018735a3b70a903dc1d319ac (diff)
downloadbcm5719-llvm-f14642f2f185f9af290f9fcace4851adbbe16432.tar.gz
bcm5719-llvm-f14642f2f185f9af290f9fcace4851adbbe16432.zip
Added support for "#pragma clang section relro=<name>"
Differential Revision: https://reviews.llvm.org/D68806 llvm-svn: 374934
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--llvm/lib/Target/TargetLoweringObjectFile.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp
index 17274e1c2c6..dcd3934de0f 100644
--- a/llvm/lib/Target/TargetLoweringObjectFile.cpp
+++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp
@@ -253,6 +253,7 @@ MCSection *TargetLoweringObjectFile::SectionForGlobal(
auto Attrs = GVar->getAttributes();
if ((Attrs.hasAttribute("bss-section") && Kind.isBSS()) ||
(Attrs.hasAttribute("data-section") && Kind.isData()) ||
+ (Attrs.hasAttribute("relro-section") && Kind.isReadOnlyWithRel()) ||
(Attrs.hasAttribute("rodata-section") && Kind.isReadOnly())) {
return getExplicitSectionGlobal(GO, Kind, TM);
}
OpenPOWER on IntegriCloud