AMDGPU/SI: Emit constant arrays in the .hsrodata_readonly_agent section
[oota-llvm.git] / lib / Target / AMDGPU / Utils / AMDGPUBaseInfo.cpp
index e3c93384bd8ee9fb4d392a8fa1de65ba3f5c4a2a..441baed9b4342e9715ee52b288b65e2795bcc57b 100644 (file)
@@ -81,6 +81,12 @@ MCSection *getHSADataGlobalProgramSection(MCContext &Ctx) {
                             ELF::SHF_AMDGPU_HSA_GLOBAL);
 }
 
+MCSection *getHSARodataReadonlyAgentSection(MCContext &Ctx) {
+  return Ctx.getELFSection(".hsarodata_readonly_agent", ELF::SHT_PROGBITS,
+                           ELF::SHF_ALLOC | ELF::SHF_AMDGPU_HSA_READONLY |
+                           ELF::SHF_AMDGPU_HSA_AGENT);
+}
+
 bool isGroupSegment(const GlobalValue *GV) {
   return GV->getType()->getAddressSpace() == AMDGPUAS::LOCAL_ADDRESS;
 }