Skip to content

Commit

Permalink
elf: add more e_ident constants
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc authored and m4b committed Jun 5, 2019
1 parent 356c3ef commit f34cf12
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/elf/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ pub const ELFDATANONE: u8 = 0;
pub const ELFDATA2LSB: u8 = 1;
/// 2's complement, big endian.
pub const ELFDATA2MSB: u8 = 2;

/// File version byte index.
pub const EI_VERSION: usize = 6;
/// Current ELF version.
pub const EV_CURRENT: u8 = 1;

/// OS ABI byte index.
pub const EI_OSABI: usize = 7;
/// UNIX System V ABI.
pub const ELFOSABI_NONE: u8 = 0;

/// ABI version byte index.
pub const EI_ABIVERSION: usize = 8;

/// Number of bytes in an identifier.
pub const SIZEOF_IDENT: usize = 16;

Expand Down Expand Up @@ -212,8 +226,8 @@ if_alloc! {
70,
typ,
byteorder,
1,
0,
EV_CURRENT,
ELFOSABI_NONE,
0,
0,
0,
Expand Down

0 comments on commit f34cf12

Please sign in to comment.