Trait object::ObjectSection

source ·
pub trait ObjectSection<'data> {
    type RelocationIterator: Iterator<Item = (u64, Relocation)>;

    fn address(&self) -> u64;
    fn size(&self) -> u64;
    fn data(&self) -> Cow<'data, [u8]>;
    fn uncompressed_data(&self) -> Cow<'data, [u8]>;
    fn name(&self) -> Option<&str>;
    fn segment_name(&self) -> Option<&str>;
    fn kind(&self) -> SectionKind;
    fn relocations(&self) -> Self::RelocationIterator;
}
Expand description

A section defined in an object file.

Required Associated Types§

An iterator over the relocations for a section.

The first field in the item tuple is the section offset that the relocation applies to.

Required Methods§

Returns the address of the section.

Returns the size of the section in memory.

Returns the raw contents of the section. The length of this data may be different from the size of the section in memory.

This does not do any decompression.

Returns the uncompressed contents of the section. The length of this data may be different from the size of the section in memory.

Returns the name of the section.

Returns the name of the segment for this section.

Return the kind of this section.

Get the relocations for this section.

Implementors§