userspace/file/format/elf/header/identifier/
index.rs

1ample::enum_labeled!(
2    pub enum Index,
3    u8,
4    "Identifier byte-byte identification",
5[
6    [0; Mag0;         (); MAG0;         "Mag0";        "File identification 1st magic byte'"],
7    [1; Mag1;         (); MAG1;         "Mag1";        "File identification 2nd magic byte'"],
8    [2; Mag2;         (); MAG2;         "Mag2";        "File identification 3rd magic byte'"],
9    [3; Mag3;         (); MAG3;         "Mag3";        "File identification 4th magic byte'"],
10    [4; Class;        (); CLASS;        "Class";       "File class byte'"],
11    [5; Data;         (); DATA;         "Data";        "Data encoding byte'"],
12    [6; Version;      (); VERSION;      "Version";     "File version byte'"],
13    [7; OsAbi;        (); OSABI;        "OsAbi";       "OS/ABI identification byte'"],
14    [8; AbiVersion;   (); ABIVERSION;   "AbiVersion";  "ABI version byte'"],
15    [9; Pad;          (); PAD;          "Pad";         "Start of padding bytes byte'"],
16    [10; Unassigned1; (); UNASSIGNED1;  "Unassigned1"; "Unassigned 10th byte'"],
17    [11; Unassigned2; (); UNASSIGNED2;  "Unassigned2"; "Unassigned 11th byte'"],
18    [12; Unassigned3; (); UNASSIGNED3;  "Unassigned3"; "Unassigned 12th byte'"],
19    [13; Unassigned4; (); UNASSIGNED4;  "Unassigned4"; "Unassigned 13th byte'"],
20    [14; Unassigned5; (); UNASSIGNED5;  "Unassigned5"; "Unassigned 14th byte'"],
21    [15; NIdent;      (); NIDENT;       "NIdent";      "Size of ELF identifier array byte'"]
22]);
23
24pub trait IndexTrait {}