pub struct Section<'data> {Show 13 fields
pub delete: bool,
pub name: ByteString<'data>,
pub sh_type: u32,
pub sh_flags: u64,
pub sh_addr: u64,
pub sh_offset: u64,
pub sh_size: u64,
pub sh_link_section: Option<SectionId>,
pub sh_info: u32,
pub sh_info_section: Option<SectionId>,
pub sh_addralign: u64,
pub sh_entsize: u64,
pub data: SectionData<'data>,
/* private fields */
}
Expand description
A section in Sections
.
This corresponds to elf::SectionHeader32
or elf::SectionHeader64
.
Fields§
§delete: bool
Ignore this section when writing the ELF file.
name: ByteString<'data>
The name of the section.
This is automatically added to the section header string table,
and the resulting string table offset is used to set the sh_name
field in the ELF section header.
sh_type: u32
The sh_type
field in the ELF section header.
One of the SHT_*
constants.
sh_flags: u64
The sh_flags
field in the ELF section header.
A combination of the SHF_*
constants.
sh_addr: u64
The sh_addr
field in the ELF section header.
sh_offset: u64
The sh_offset
field in the ELF section header.
This is the file offset of the data in the section. Writing will fail if the data cannot be placed at this offset.
This is only used for sections that have SHF_ALLOC
set.
For other sections, the section data is written at the next available
offset.
sh_size: u64
The sh_size
field in the ELF section header.
This size is not used when writing. The size of the data
field is
used instead.
sh_link_section: Option<SectionId>
The ID of the section linked to by the sh_link
field in the ELF section header.
sh_info: u32
The sh_info
field in the ELF section header.
Only used if sh_info_section
is None
.
sh_info_section: Option<SectionId>
The ID of the section linked to by the sh_info
field in the ELF section header.
sh_addralign: u64
The sh_addralign
field in the ELF section header.
sh_entsize: u64
The sh_entsize
field in the ELF section header.
data: SectionData<'data>
The section data.