Expand description
§object
The object
crate provides a unified interface to working with object files
across platforms. It supports reading relocatable object files and executable files,
and writing relocatable object files and some executable files.
§Raw struct definitions
Raw structs are defined for: ELF, Mach-O, PE/COFF,
XCOFF, archive.
Types and traits for zerocopy support are defined in the pod
and endian
modules.
§Unified read API
The read
module provides a unified read API using the read::Object
trait.
There is an implementation of this trait for read::File
, which allows reading any
file format, as well as implementations for each file format.
§Low level read API
The read
submodules define helpers that operate on the raw structs.
These can be used instead of the unified API, or in conjunction with it to access
details that are not available via the unified API.
§Unified write API
The write
module provides a unified write API for relocatable object files
using write::Object
. This does not support writing executable files.
§Low level write API
The write
submodules define helpers for writing the raw structs.
§Build API
The build
submodules define helpers for building object files, either from
scratch or by modifying existing files.
§Shared definitions
The crate provides a number of definitions that are used by both the read and write APIs. These are defined at the top level module, but none of these are the main entry points of the crate.
Re-exports§
Modules§
- archive
- Archive definitions.
- build
- Interface for building object files.
- 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.
- write
- Interface for writing object files.
- xcoff
- XCOFF definitions
Enums§
- Address
Size - The size of an address value for an architecture.
- Architecture
- A CPU architecture.
- Binary
Format - A binary file format.
- Comdat
Kind - The selection kind for a COMDAT section group.
- File
Flags - File flags that are specific to each file format.
- Relocation
Encoding - Information about how the result of the relocation operation is encoded in the place.
- Relocation
Flags - Relocation fields that are specific to each file format and architecture.
- Relocation
Kind - The operation used to calculate the result of the relocation.
- Section
Flags - Section flags that are specific to each file format.
- Section
Kind - The kind of a section.
- Segment
Flags - Segment flags that are specific to each file format.
- SubArchitecture
- A CPU sub-architecture.
- Symbol
Flags - Symbol flags that are specific to each file format.
- Symbol
Kind - The kind of a symbol.
- Symbol
Scope - A symbol scope.