From 0295f8ce3962d12929eed16cde65f4498a2564b5 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 9 Jul 2016 01:59:51 +0000 Subject: CodeGen: tweak CFString section for COFF, ELF Place the structure data into `cfstring`. This both isolates the structures to permit coalescing in the future (by the linker) as well as ensures that it doesnt get marked as read-only data. The structures themselves are not read-only, only the string contents. llvm-svn: 274956 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c6e20a5..55b13b4 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3209,10 +3209,8 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { case llvm::Triple::UnknownObjectFormat: llvm_unreachable("unknown file format"); case llvm::Triple::COFF: - GV->setSection(".rdata.cfstring"); - break; case llvm::Triple::ELF: - GV->setSection(".rodata.cfstring"); + GV->setSection("cfstring"); break; case llvm::Triple::MachO: GV->setSection("__DATA,__cfstring"); -- cgit v1.1