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/Target/TargetLoweringObjectFile.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp') 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); } -- cgit v1.2.3