[VENTUS][fix] Add `.rodata.ventus.resource` in linker script

This commit is contained in:
zhoujingya 2023-09-15 16:41:21 +08:00
parent dc788b8e36
commit 319e10771e
2 changed files with 2 additions and 1 deletions

View File

@ -201,7 +201,7 @@ bool RISCVAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
STI->getVentusProgramInfo());
if (MF.getInfo<RISCVMachineFunctionInfo>()->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);

View File

@ -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 :