Add C-style definitions for Elf[32|64]_Chdr

This commit is contained in:
Christopher Cole 2023-01-26 12:58:58 -08:00
parent 161f679004
commit 8ed49b6a4c
No known key found for this signature in database
GPG Key ID: 0AC856975983E9DB

View File

@ -9,6 +9,27 @@ use crate::endian::EndianParse;
use crate::file::Class;
use crate::parse::{ParseAt, ParseError};
/// C-style 32-bit ELF Compression Header definition
///
/// These C-style definitions are for users who want to implement their own ELF manipulation logic.
#[repr(C)]
pub struct Elf32_Chdr {
pub ch_type: u32,
pub ch_size: u32,
pub ch_addralign: u32,
}
/// C-style 64-bit ELF Compression Header definition
///
/// These C-style definitions are for users who want to implement their own ELF manipulation logic.
#[repr(C)]
pub struct Elf64_Chdr {
pub ch_type: u32,
pub ch_reserved: u32,
pub ch_size: u64,
pub ch_addralign: u64,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CompressionHeader {
pub ch_type: u32,