diff --git a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp index 2090fb4f76fb..88d09ea19dc5 100644 --- a/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp +++ b/llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp @@ -201,7 +201,7 @@ bool RISCVAsmPrinter::runOnMachineFunction(MachineFunction &MF) { STI->getVentusProgramInfo()); if (MF.getInfo()->isEntryFunction()) { MCSectionELF *ResourceSection = OutContext.getELFSection( - ".rodata.ventus.resource", ELF::SHT_PROGBITS, ELF::SHF_WRITE); + ".ventus.resource", ELF::SHT_PROGBITS, ELF::SHF_WRITE); OutStreamer->switchSection(ResourceSection); OutStreamer->emitInt16(CurrentProgramInfo->VGPRUsage); OutStreamer->emitInt16(CurrentProgramInfo->SGPRUsage); diff --git a/utils/ldscripts/ventus/elf32lriscv.ld b/utils/ldscripts/ventus/elf32lriscv.ld index fe7106397aac..ac234a61adc1 100644 --- a/utils/ldscripts/ventus/elf32lriscv.ld +++ b/utils/ldscripts/ventus/elf32lriscv.ld @@ -77,6 +77,7 @@ SECTIONS PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); + .rodata.ventus.resource : { *(.ventus.resource) } .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } .rodata1 : { *(.rodata1) } .sdata2 :