Skip to content

[lldb] SHT_NOBITS sections type #99044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down
Loading