mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Remove "JumpTableDataSection" from TAI, instead, have AsmPrinter
compute it based on what it knows. As part of this, rename getSectionForMergeableConstant to getSectionForConstant because it works for non-mergable constants also. The only functionality change from this is that Xcore will start dropping its jump tables into readonly section instead of data section in -static mode. This should be fine as the linker resolves the relocations. If this is a problem, let me know and we'll come up with another solution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77833 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -178,7 +178,13 @@ void ELFWriter::addExternalSymbol(const char *External) {
|
||||
// Get jump table section on the section name returned by TAI
|
||||
ELFSection &ELFWriter::getJumpTableSection() {
|
||||
unsigned Align = TM.getTargetData()->getPointerABIAlignment();
|
||||
return getSection(TAI->getJumpTableDataSection(),
|
||||
|
||||
const TargetLoweringObjectFile &TLOF =
|
||||
TM.getTargetLowering()->getObjFileLowering();
|
||||
|
||||
return getSection(TLOF.getSectionForConstant(
|
||||
SectionKind::get(SectionKind::ReadOnly))
|
||||
->getName(),
|
||||
ELFSection::SHT_PROGBITS,
|
||||
ELFSection::SHF_ALLOC, Align);
|
||||
}
|
||||
@@ -204,7 +210,7 @@ ELFSection &ELFWriter::getConstantPoolSection(MachineConstantPoolEntry &CPE) {
|
||||
const TargetLoweringObjectFile &TLOF =
|
||||
TM.getTargetLowering()->getObjFileLowering();
|
||||
|
||||
return getSection(TLOF.getSectionForMergeableConstant(Kind)->getName(),
|
||||
return getSection(TLOF.getSectionForConstant(Kind)->getName(),
|
||||
ELFSection::SHT_PROGBITS,
|
||||
ELFSection::SHF_MERGE | ELFSection::SHF_ALLOC,
|
||||
CPE.getAlignment());
|
||||
|
Reference in New Issue
Block a user