Skip to content

Commit

Permalink
elf: more SHT definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc committed Jul 21, 2021
1 parent f30fe64 commit f6193d8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/readobj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,16 @@ mod elf {
SHT_PREINIT_ARRAY,
SHT_GROUP,
SHT_SYMTAB_SHNDX,
SHT_GNU_ATTRIBUTES,
SHT_GNU_HASH,
SHT_GNU_LIBLIST,
SHT_CHECKSUM,
SHT_SUNW_move,
SHT_SUNW_COMDAT,
SHT_SUNW_syminfo,
SHT_GNU_VERDEF,
SHT_GNU_VERNEED,
SHT_GNU_VERSYM,
);
static FLAGS_SHT_MIPS: &[Flag<u32>] = &flags!(
SHT_MIPS_LIBLIST,
Expand Down
27 changes: 27 additions & 0 deletions src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,33 @@ pub const SHT_GROUP: u32 = 17;
pub const SHT_SYMTAB_SHNDX: u32 = 18;
/// Start of OS-specific section types.
pub const SHT_LOOS: u32 = 0x6000_0000;
/// Object attributes.
pub const SHT_GNU_ATTRIBUTES: u32 = 0x6fff_fff5;
/// GNU-style hash table.
pub const SHT_GNU_HASH: u32 = 0x6fff_fff6;
/// Prelink library list
pub const SHT_GNU_LIBLIST: u32 = 0x6fff_fff7;
/// Checksum for DSO content.
pub const SHT_CHECKSUM: u32 = 0x6fff_fff8;
/// Sun-specific low bound.
pub const SHT_LOSUNW: u32 = 0x6fff_fffa;
#[allow(missing_docs, non_upper_case_globals)]
pub const SHT_SUNW_move: u32 = 0x6fff_fffa;
#[allow(missing_docs)]
pub const SHT_SUNW_COMDAT: u32 = 0x6fff_fffb;
#[allow(missing_docs, non_upper_case_globals)]
pub const SHT_SUNW_syminfo: u32 = 0x6fff_fffc;
/// Version definition section.
#[allow(non_upper_case_globals)]
pub const SHT_GNU_VERDEF: u32 = 0x6fff_fffd;
/// Version needs section.
#[allow(non_upper_case_globals)]
pub const SHT_GNU_VERNEED: u32 = 0x6fff_fffe;
/// Version symbol table.
#[allow(non_upper_case_globals)]
pub const SHT_GNU_VERSYM: u32 = 0x6fff_ffff;
/// Sun-specific high bound.
pub const SHT_HISUNW: u32 = 0x6fff_ffff;
/// End of OS-specific section types.
pub const SHT_HIOS: u32 = 0x6fff_ffff;
/// Start of processor-specific section types.
Expand Down

0 comments on commit f6193d8

Please sign in to comment.