From f14642f2f185f9af290f9fcace4851adbbe16432 Mon Sep 17 00:00:00 2001 From: Dmitry Mikulin Date: Tue, 15 Oct 2019 18:31:10 +0000 Subject: Added support for "#pragma clang section relro=" Differential Revision: https://reviews.llvm.org/D68806 llvm-svn: 374934 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') 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(); } -- cgit v1.1