aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.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/CodeGen/TargetLoweringObjectFileImpl.cpp
parent2cb27072cefb11d5018735a3b70a903dc1d319ac (diff)
downloadllvm-f14642f2f185f9af290f9fcace4851adbbe16432.zip
llvm-f14642f2f185f9af290f9fcace4851adbbe16432.tar.gz
llvm-f14642f2f185f9af290f9fcace4851adbbe16432.tar.bz2
Added support for "#pragma clang section relro=<name>"
Differential Revision: https://reviews.llvm.org/D68806 llvm-svn: 374934
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 89a98bba..4978f4b 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -568,6 +568,8 @@ MCSection *TargetLoweringObjectFileELF::getExplicitSectionGlobal(
SectionName = Attrs.getAttribute("bss-section").getValueAsString();
} else if (Attrs.hasAttribute("rodata-section") && Kind.isReadOnly()) {
SectionName = Attrs.getAttribute("rodata-section").getValueAsString();
+ } else if (Attrs.hasAttribute("relro-section") && Kind.isReadOnlyWithRel()) {
+ SectionName = Attrs.getAttribute("relro-section").getValueAsString();
} else if (Attrs.hasAttribute("data-section") && Kind.isData()) {
SectionName = Attrs.getAttribute("data-section").getValueAsString();
}