//! Support for reading Windows COFF files. //! //! Traits are used to abstract over the difference between COFF object files //! and COFF bigobj files. The primary trait for this is [`CoffHeader`]. //! //! ## High level API //! //! [`CoffFile`] implements the [`Object`](crate::read::Object) trait for //! COFF files. [`CoffFile`] is parameterised by [`CoffHeader`]. //! The default parameter allows reading regular COFF object files, //! while the type alias [`CoffBigFile`] allows reading COFF bigobj files. //! //! [`ImportFile`] allows reading COFF short imports that are used in import //! libraries. Currently these are not integrated with the unified read API. //! //! ## Low level API //! //! The [`CoffHeader`] trait can be directly used to parse both COFF //! object files (which start with [`pe::ImageFileHeader`]) and COFF bigobj //! files (which start with [`pe::AnonObjectHeaderBigobj`]). //! //! ### Example for low level API //! ```no_run //! use object::pe; //! use object::read::coff::{CoffHeader, ImageSymbol as _}; //! use std::error::Error; //! use std::fs; //! //! /// Reads a file and displays the name of each section and symbol. //! fn main() -> Result<(), Box<dyn Error>> { //! # #[cfg(feature = "std")] { //! let data = fs::read("path/to/binary")?; //! let mut offset = 0; //! let header = pe::ImageFileHeader::parse(&*data, &mut offset)?; //! let sections = header.sections(&*data, offset)?; //! let symbols = header.symbols(&*data)?; //! for section in sections.iter() { //! println!("{}", String::from_utf8_lossy(section.name(symbols.strings())?)); //! } //! for (_index, symbol) in symbols.iter() { //! println!("{}", String::from_utf8_lossy(symbol.name(symbols.strings())?)); //! } //! # } //! Ok(()) //! } //! ``` #[cfg(doc)] usecrate::pe;
mod file; pubuse file::*;
mod section; pubuse section::*;
mod symbol; pubuse symbol::*;
mod relocation; pubuse relocation::*;
mod comdat; pubuse comdat::*;
mod import; pubuse import::*;
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-06-18)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.