[lldb] SHT_NOBITS sections type (#99044)
.sbss section was recognized as eSectionTypeOther, but has to be eSectionTypeZeroFill. Fixed tests for RISCV target: TestClassLoadingViaMemberTypedef.TestCase TestClassTemplateNonTypeParameterPack.TestCaseClassTemplateNonTypeParameterPack TestThreadSelectionBug.TestThreadSelectionBug lldbsuite.test.lldbtest.TestOffsetof lldbsuite.test.lldbtest.TestOffsetofCpp TestTargetDumpTypeSystem.TestCase TestCPP11EnumTypes.CPP11EnumTypesTestCase TestCppIsTypeComplete.TestCase TestExprCrash.ExprCrashTestCase TestDebugIndexCache.DebugIndexCacheTestcase
This commit is contained in:
@@ -1696,7 +1696,6 @@ static SectionType GetSectionTypeFromName(llvm::StringRef Name) {
|
||||
return llvm::StringSwitch<SectionType>(Name)
|
||||
.Case(".ARM.exidx", eSectionTypeARMexidx)
|
||||
.Case(".ARM.extab", eSectionTypeARMextab)
|
||||
.Cases(".bss", ".tbss", eSectionTypeZeroFill)
|
||||
.Case(".ctf", eSectionTypeDebug)
|
||||
.Cases(".data", ".tdata", eSectionTypeData)
|
||||
.Case(".eh_frame", eSectionTypeEHFrame)
|
||||
@@ -1713,6 +1712,10 @@ SectionType ObjectFileELF::GetSectionType(const ELFSectionHeaderInfo &H) const {
|
||||
if (H.sh_flags & SHF_EXECINSTR)
|
||||
return eSectionTypeCode;
|
||||
break;
|
||||
case SHT_NOBITS:
|
||||
if (H.sh_flags & SHF_ALLOC)
|
||||
return eSectionTypeZeroFill;
|
||||
break;
|
||||
case SHT_SYMTAB:
|
||||
return eSectionTypeELFSymbolTable;
|
||||
case SHT_DYNSYM:
|
||||
|
||||
Reference in New Issue
Block a user