Skip to content

Commit 9579bca

Browse files
committed
multiboot2: elf_sections: Added UserDefined section type to ElfSectionType
1 parent 627bfb4 commit 9579bca

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

multiboot2/src/elf_sections.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ impl ElfSectionExt for SectionHeader {
176176
elf::abi::SHT_DYNSYM => ElfSectionType::DynamicLoaderSymbolTable,
177177
elf::abi::SHT_LOOS..=elf::abi::SHT_HIOS => ElfSectionType::EnvironmentSpecific,
178178
elf::abi::SHT_LOPROC..=elf::abi::SHT_HIPROC => ElfSectionType::ProcessorSpecific,
179+
elf::abi::SHT_LOUSER..=elf::abi::SHT_HIUSER => ElfSectionType::UserDefined,
179180
e => {
180181
log::warn!("Unknown section type {e:x}. Treating as ElfSectionType::Unused");
181182
ElfSectionType::Unused
@@ -251,6 +252,10 @@ pub enum ElfSectionType {
251252
/// Values in this inclusive range (`[0x7000_0000, 0x7FFF_FFFF)`) are
252253
/// reserved for processor-specific semantics.
253254
ProcessorSpecific = elf::abi::SHT_LOPROC,
255+
256+
/// Values in this inclusive range (`[0x8000_0000, 0x8FFF_FFFF)`) are
257+
/// reserved for user-specific semantics.
258+
UserDefined = elf::abi::SHT_LOUSER,
254259
}
255260

256261
bitflags! {

0 commit comments

Comments
 (0)