Trait object::Object[][src]

pub trait Object<'data, 'file> {
    type Segment: ObjectSegment<'data>;
    type SegmentIterator: Iterator<Item = Self::Segment>;
    type Section: ObjectSection<'data>;
    type SectionIterator: Iterator<Item = Self::Section>;
    type SymbolIterator: Iterator<Item = Symbol<'data>>;
    fn machine(&self) -> Machine;
fn segments(&'file self) -> Self::SegmentIterator;
fn entry(&'file self) -> u64;
fn section_data_by_name(
        &self,
        section_name: &str
    ) -> Option<Cow<'data, [u8]>>;
fn sections(&'file self) -> Self::SectionIterator;
fn symbols(&'file self) -> Self::SymbolIterator;
fn dynamic_symbols(&'file self) -> Self::SymbolIterator;
fn symbol_map(&self) -> SymbolMap<'data>;
fn is_little_endian(&self) -> bool;
fn has_debug_symbols(&self) -> bool; fn mach_uuid(&self) -> Option<Uuid> { ... }
fn build_id(&self) -> Option<&'data [u8]> { ... }
fn gnu_debuglink(&self) -> Option<(&'data [u8], u32)> { ... } }

An object file.

Associated Types

A segment in the object file.

An iterator over the segments in the object file.

A section in the object file.

An iterator over the sections in the object file.

An iterator over the symbols in the object file.

Required Methods

Get the machine type of the file.

Get an iterator over the segments in the file.

Get the entry point address of the binary

Get the contents of the section named section_name, if such a section exists.

If section_name starts with a '.' then it is treated as a system section name, and is compared using the conventions specific to the object file format. For example, if ".text" is requested for a Mach-O object file, then the actual section name that is searched for is "__text".

For some object files, multiple segments may contain sections with the same name. In this case, the first matching section will be used.

This may decompress section data.

Get an iterator over the sections in the file.

Get an iterator over the debugging symbols in the file.

Get an iterator over the dynamic linking symbols in the file.

Construct a map from addresses to symbols.

Return true if the file is little endian, false if it is big endian.

Return true if the file contains debug information sections, false if not.

Provided Methods

The UUID from a Mach-O LC_UUID load command.

The build ID from an ELF NT_GNU_BUILD_ID note.

The filename and CRC from a .gnu_debuglink section.

Implementors