diff options
author | dlav-sc <daniil.avdeev@syntacore.com> | 2024-07-19 14:22:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-19 13:22:18 +0200 |
commit | fdfc49186318727653cf6b13686bb77cfed60e33 (patch) | |
tree | 5f8923f42ee9c85f75d3ec9d37759dc27cd6a8fb /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | |
parent | e404eed24bebd5e3e04fc153eb330bae7d92107f (diff) | |
download | llvm-fdfc49186318727653cf6b13686bb77cfed60e33.zip llvm-fdfc49186318727653cf6b13686bb77cfed60e33.tar.gz llvm-fdfc49186318727653cf6b13686bb77cfed60e33.tar.bz2 |
[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
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index 51bd34e..890db5c 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -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: |