Crate object[−][src]
object
The object
crate provides a unified interface to working with object files
across platforms. It supports reading object files and executable files,
and writing object files.
Raw struct definitions
Raw structs are defined for: ELF, Mach-O, PE/COFF, archive. Types and traits for zerocopy support are defined in pod and endian.
Unified read API
The read::Object trait defines the unified interace. This trait is implemented by read::File, which allows reading any file format, as well as implementations for each file format: ELF, Mach-O, COFF, PE, Wasm.
Low level read API
In addition to the unified read API, the various read
modules define helpers that
operate on the raw structs. These also provide traits that abstract over the differences
between 32-bit and 64-bit versions of the file format.
Unified write API
[write::Object] allows building an object and then writing it out.
Re-exports
pub use endian::*; |
pub use pod::*; |
pub use read::*; |
Modules
archive | Archive definitions. |
elf | ELF definitions. |
endian | Types for compile-time and run-time endianness. |
macho | Mach-O definitions. |
pe | PE/COFF definitions. |
pod | Tools for converting file format structures to and from bytes. |
read | Interface for reading object files. |
Enums
AddressSize | The size of an address value for an architecture. |
Architecture | A CPU architecture. |
BinaryFormat | A binary file format. |
ComdatKind | The selection kind for a COMDAT section group. |
FileFlags | File flags that are specific to each file format. |
RelocationEncoding | Information about how the result of the relocation operation is encoded in the place. |
RelocationKind | The operation used to calculate the result of the relocation. |
SectionFlags | Section flags that are specific to each file format. |
SectionKind | The kind of a section. |
SymbolFlags | Symbol flags that are specific to each file format. |
SymbolKind | The kind of a symbol. |
SymbolScope | A symbol scope. |