<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="An object file."><title>Object in object::read - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-ac92e1bbe349e143.css"><metaname="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="object"data-themes=""data-resource-suffix=""data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)"data-channel="1.76.0"data-search-js="search-2b6ce74ff89ae146.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-305769736d49e732.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../../object/index.html">object</a><spanclass="version">0.32.2</span></h2></div><h2class="location"><ahref="#">Object</a></h2><divclass="sidebar-elems"><section><h3><ahref="#required-associated-types">Required Associated Types</a></h3><ulclass="block"><li><ahref="#associatedtype.Comdat">Comdat</a></li><li><ahref="#associatedtype.ComdatIterator">ComdatIterator</a></li><li><ahref="#associatedtype.DynamicRelocationIterator">DynamicRelocationIterator</a></li><li><ahref="#associatedtype.Section">Section</a></li><li><ahref="#associatedtype.SectionIterator">SectionIterator</a></li><li><ahref="#associatedtype.Segment">Segment</a></li><li><ahref="#associatedtype.SegmentIterator">SegmentIterator</a></li><li><ahref="#associatedtype.Symbol">Symbol</a></li><li><ahref="#associatedtype.SymbolIterator">SymbolIterator</a></li><li><ahref="#associatedtype.SymbolTable">SymbolTable</a></li></ul><h3><ahref="#required-methods">Required Methods</a></h3><ulclass="block"><li><ahref="#tymethod.architecture">architecture</a></li><li><ahref="#tymethod.comdats">comdats</a></li><li><ahref="#tymethod.dynamic_relocations">dynamic_relocations</a></li><li><ahref="#tymethod.dynamic_symbol_table">dynamic_symbol_table</a></li><li><ahref="#tymethod.dynamic_symbols">dynamic_symbols</a></li><li><ahref="#tymethod.entry">entry</a></li><li><ahref="#tymethod.exports">exports</a></li><li><ahref="#tymethod.flags">flags</a></li><li><ahref="#tymethod.has_debug_symbols">has_debug_symbols</a></li><li><ahref="#tymethod.imports">imports</a></li><li><ahref="#tymethod.is_64">is_64</a></li><li><ahref="#tymethod.is_little_endian">is_little_endian</a></li><li><ahref="#tymethod.kind">kind</a></li><li><ahref="#tymethod.relative_address_base">relative_address_base</a></li><li><ah
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../object/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Trait <ahref="../index.html">object</a>::<wbr><ahref="index.html">read</a>::<wbr><aclass="trait"href="#">Object</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../src/object/read/traits.rs.html#15-300">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub trait Object<'data: 'file, 'file>: Sealed {
type <ahref="#associatedtype.Segment"class="associatedtype">Segment</a>: <aclass="trait"href="trait.ObjectSegment.html"title="trait object::read::ObjectSegment">ObjectSegment</a><'data>;
type <ahref="#associatedtype.SegmentIterator"class="associatedtype">SegmentIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Segment"title="type object::read::Object::Segment">Segment</a>>;
type <ahref="#associatedtype.Section"class="associatedtype">Section</a>: <aclass="trait"href="trait.ObjectSection.html"title="trait object::read::ObjectSection">ObjectSection</a><'data>;
type <ahref="#associatedtype.SectionIterator"class="associatedtype">SectionIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Section"title="type object::read::Object::Section">Section</a>>;
type <ahref="#associatedtype.Comdat"class="associatedtype">Comdat</a>: <aclass="trait"href="trait.ObjectComdat.html"title="trait object::read::ObjectComdat">ObjectComdat</a><'data>;
type <ahref="#associatedtype.ComdatIterator"class="associatedtype">ComdatIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Comdat"title="type object::read::Object::Comdat">Comdat</a>>;
type <ahref="#associatedtype.Symbol"class="associatedtype">Symbol</a>: <aclass="trait"href="trait.ObjectSymbol.html"title="trait object::read::ObjectSymbol">ObjectSymbol</a><'data>;
type <ahref="#associatedtype.SymbolIterator"class="associatedtype">SymbolIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Symbol"title="type object::read::Object::Symbol">Symbol</a>>;
type <ahref="#associatedtype.SymbolTable"class="associatedtype">SymbolTable</a>: <aclass="trait"href="trait.ObjectSymbolTable.html"title="trait object::read::ObjectSymbolTable">ObjectSymbolTable</a><'data, Symbol = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Symbol"title="type object::read::Object::Symbol">Symbol</a>, SymbolIterator = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.SymbolIterator"title="type object::read::Object::SymbolIterator">SymbolIterator</a>>;
<p>This is the primary trait for the unified read API.</p>
</div></details><h2id="required-associated-types"class="section-header">Required Associated Types<ahref="#required-associated-types"class="anchor">§</a></h2><divclass="methods"><detailsclass="toggle"open><summary><sectionid="associatedtype.Segment"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#17">source</a><h4class="code-header">type <ahref="#associatedtype.Segment"class="associatedtype">Segment</a>: <aclass="trait"href="trait.ObjectSegment.html"title="trait object::read::ObjectSegment">ObjectSegment</a><'data></h4></section></summary><divclass="docblock"><p>A loadable segment in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.SegmentIterator"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#20">source</a><h4class="code-header">type <ahref="#associatedtype.SegmentIterator"class="associatedtype">SegmentIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Segment"title="type object::read::Object::Segment">Segment</a>></h4></section></summary><divclass="docblock"><p>An iterator for the loadable segments in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.Section"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#23">source</a><h4class="code-header">type <ahref="#associatedtype.Section"class="associatedtype">Section</a>: <aclass="trait"href="trait.ObjectSection.html"title="trait object::read::ObjectSection">ObjectSection</a><'data></h4></section></summary><divclass="docblock"><p>A section in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.SectionIterator"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#26">source</a><h4class="code-header">type <ahref="#associatedtype.SectionIterator"class="associatedtype">SectionIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Section"title="type object::read::Object::Section">Section</a>></h4></section></summary><divclass="docblock"><p>An iterator for the sections in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.Comdat"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#29">source</a><h4class="code-header">type <ahref="#associatedtype.Comdat"class="associatedtype">Comdat</a>: <aclass="trait"href="trait.ObjectComdat.html"title="trait object::read::ObjectComdat">ObjectComdat</a><'data></h4></section></summary><divclass="docblock"><p>A COMDAT section group in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.ComdatIterator"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#32">source</a><h4class="code-header">type <ahref="#associatedtype.ComdatIterator"class="associatedtype">ComdatIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Comdat"title="type object::read::Object::Comdat">Comdat</a>></h4></section></summary><divclass="docblock"><p>An iterator for the COMDAT section groups in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.Symbol"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#35">source</a><h4class="code-header">type <ahref="#associatedtype.Symbol"class="associatedtype">Symbol</a>: <aclass="trait"href="trait.ObjectSymbol.html"title="trait object::read::ObjectSymbol">ObjectSymbol</a><'data></h4></section></summary><divclass="docblock"><p>A symbol in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.SymbolIterator"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#38">source</a><h4class="code-header">type <ahref="#associatedtype.SymbolIterator"class="associatedtype">SymbolIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Symbol"title="type object::read::Object::Symbol">Symbol</a>></h4></section></summary><divclass="docblock"><p>An iterator for symbols in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.SymbolTable"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#41-45">source</a><h4class="code-header">type <ahref="#associatedtype.SymbolTable"class="associatedtype">SymbolTable</a>: <aclass="trait"href="trait.ObjectSymbolTable.html"title="trait object::read::ObjectSymbolTable">ObjectSymbolTable</a><'data, Symbol = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Symbol"title="type object::read::Object::Symbol">Symbol</a>, SymbolIterator = Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.SymbolIterator"title="type object::read::Object::SymbolIterator">SymbolIterator</a>></h4></section></summary><divclass="docblock"><p>A symbol table in the object file.</p>
</div></details><detailsclass="toggle"open><summary><sectionid="associatedtype.DynamicRelocationIterator"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#51">source</a><h4class="code-header">type <ahref="#associatedtype.DynamicRelocationIterator"class="associatedtype">DynamicRelocationIterator</a>: <aclass="trait"href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html"title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = (<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u64.html">u64</a>, <aclass="struct"href="struct.Relocation.html"title="struct object::read::Relocation">Relocation</a>)></h4></section></summary><divclass="docblock"><p>An iterator for the dynamic relocations in the file.</p>
<p>The first field in the item tuple is the address
that the relocation applies to.</p>
</div></details></div><h2id="required-methods"class="section-header">Required Methods<ahref="#required-methods"class="anchor">§</a></h2><divclass="methods"><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.architecture"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#54">source</a><h4class="code-header">fn <ahref="#tymethod.architecture"class="fn">architecture</a>(&self) -><aclass="enum"href="../enum.Architecture.html"title="enum object::Architecture">Architecture</a></h4></section></summary><divclass="docblock"><p>Get the architecture type of the file.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.is_little_endian"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#76">source</a><h4class="code-header">fn <ahref="#tymethod.is_little_endian"class="fn">is_little_endian</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Return true if the file is little endian, false if it is big endian.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.is_64"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#79">source</a><h4class="code-header">fn <ahref="#tymethod.is_64"class="fn">is_64</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Return true if the file can contain 64-bit addresses.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.kind"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#82">source</a><h4class="code-header">fn <ahref="#tymethod.kind"class="fn">kind</a>(&self) -><aclass="enum"href="enum.ObjectKind.html"title="enum object::read::ObjectKind">ObjectKind</a></h4></section></summary><divclass="docblock"><p>Return the kind of this object.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.segments"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#90">source</a><h4class="code-header">fn <ahref="#tymethod.segments"class="fn">segments</a>(&'file self) -> Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.SegmentIterator"title="type object::read::Object::SegmentIterator">SegmentIterator</a></h4></section></summary><divclass="docblock"><p>Get an iterator for the loadable segments in the file.</p>
<p>For ELF, this is program headers with type <ahref="../elf/constant.PT_LOAD.html"title="constant object::elf::PT_LOAD"><code>PT_LOAD</code></a>.
For Mach-O, this is load commands with type <ahref="../macho/constant.LC_SEGMENT.html"title="constant object::macho::LC_SEGMENT"><code>LC_SEGMENT</code></a>
or <ahref="../macho/constant.LC_SEGMENT_64.html"title="constant object::macho::LC_SEGMENT_64"><code>LC_SEGMENT_64</code></a>.
) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Section"title="type object::read::Object::Section">Section</a>></h4></section></summary><divclass="docblock"><p>Like <ahref="trait.Object.html#method.section_by_name"><code>Self::section_by_name</code></a>, but allows names that are not UTF-8.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.section_by_index"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#120">source</a><h4class="code-header">fn <ahref="#tymethod.section_by_index"class="fn">section_by_index</a>(&'file self, index: <aclass="struct"href="struct.SectionIndex.html"title="struct object::read::SectionIndex">SectionIndex</a>) -><aclass="type"href="type.Result.html"title="type object::read::Result">Result</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Section"title="type object::read::Object::Section">Section</a>></h4></section></summary><divclass="docblock"><p>Get the section at the given index.</p>
<p>The meaning of the index depends on the object file.</p>
<p>For some object files, this requires iterating through all sections.</p>
<p>Returns an error if the index is invalid.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.sections"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#123">source</a><h4class="code-header">fn <ahref="#tymethod.sections"class="fn">sections</a>(&'file self) -> Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.SectionIterator"title="type object::read::Object::SectionIterator">SectionIterator</a></h4></section></summary><divclass="docblock"><p>Get an iterator for the sections in the file.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.comdats"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#126">source</a><h4class="code-header">fn <ahref="#tymethod.comdats"class="fn">comdats</a>(&'file self) -> Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.ComdatIterator"title="type object::read::Object::ComdatIterator">ComdatIterator</a></h4></section></summary><divclass="docblock"><p>Get an iterator for the COMDAT section groups in the file.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.symbol_table"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#129">source</a><h4class="code-header">fn <ahref="#tymethod.symbol_table"class="fn">symbol_table</a>(&'file self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.SymbolTable"title="type object::read::Object::SymbolTable">SymbolTable</a>></h4></section></summary><divclass="docblock"><p>Get the debugging symbol table, if any.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.symbol_by_index"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#136">source</a><h4class="code-header">fn <ahref="#tymethod.symbol_by_index"class="fn">symbol_by_index</a>(&'file self, index: <aclass="struct"href="struct.SymbolIndex.html"title="struct object::read::SymbolIndex">SymbolIndex</a>) -><aclass="type"href="type.Result.html"title="type object::read::Result">Result</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Symbol"title="type object::read::Object::Symbol">Symbol</a>></h4></section></summary><divclass="docblock"><p>Get the debugging symbol at the given index.</p>
<p>The meaning of the index depends on the object file.</p>
<p>Returns an error if the index is invalid.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.symbols"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#143">source</a><h4class="code-header">fn <ahref="#tymethod.symbols"class="fn">symbols</a>(&'file self) -> Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.SymbolIterator"title="type object::read::Object::SymbolIterator">SymbolIterator</a></h4></section></summary><divclass="docblock"><p>Get an iterator for the debugging symbols in the file.</p>
<p>This may skip over symbols that are malformed or unsupported.</p>
<p>For Mach-O files, this does not include STAB entries.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.dynamic_symbol_table"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#160">source</a><h4class="code-header">fn <ahref="#tymethod.dynamic_symbol_table"class="fn">dynamic_symbol_table</a>(&'file self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.SymbolTable"title="type object::read::Object::SymbolTable">SymbolTable</a>></h4></section></summary><divclass="docblock"><p>Get the dynamic linking symbol table, if any.</p>
<p>Only ELF has a separate dynamic linking symbol table.
Consider using <ahref="trait.Object.html#tymethod.exports"><code>Self::exports</code></a> or <ahref="trait.Object.html#tymethod.imports"><code>Self::imports</code></a> instead.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.dynamic_symbols"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#169">source</a><h4class="code-header">fn <ahref="#tymethod.dynamic_symbols"class="fn">dynamic_symbols</a>(&'file self) -> Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.SymbolIterator"title="type object::read::Object::SymbolIterator">SymbolIterator</a></h4></section></summary><divclass="docblock"><p>Get an iterator for the dynamic linking symbols in the file.</p>
<p>This may skip over symbols that are malformed or unsupported.</p>
<p>Only ELF has dynamic linking symbols.
Other file formats will return an empty iterator.
Consider using <ahref="trait.Object.html#tymethod.exports"><code>Self::exports</code></a> or <ahref="trait.Object.html#tymethod.imports"><code>Self::imports</code></a> instead.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.dynamic_relocations"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#176">source</a><h4class="code-header">fn <ahref="#tymethod.dynamic_relocations"class="fn">dynamic_relocations</a>(&'file self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.DynamicRelocationIterator"title="type object::read::Object::DynamicRelocationIterator">DynamicRelocationIterator</a>></h4></section></summary><divclass="docblock"><p>Get the dynamic relocations for this file.</p>
<p>Symbol indices in these relocations refer to the dynamic symbol table.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.exports"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#255">source</a><h4class="code-header">fn <ahref="#tymethod.exports"class="fn">exports</a>(&self) -><aclass="type"href="type.Result.html"title="type object::read::Result">Result</a><<aclass="struct"href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="struct"href="struct.Export.html"title="struct object::read::Export">Export</a><'data>>></h4></section></summary><divclass="docblock"><p>Get the exported symbols that expose both a name and an address.</p>
<p>Some file formats may provide other kinds of symbols that can be retrieved using
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.has_debug_symbols"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#258">source</a><h4class="code-header">fn <ahref="#tymethod.has_debug_symbols"class="fn">has_debug_symbols</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Return true if the file contains DWARF debug information sections, false if not.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.relative_address_base"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#293">source</a><h4class="code-header">fn <ahref="#tymethod.relative_address_base"class="fn">relative_address_base</a>(&'file self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u64.html">u64</a></h4></section></summary><divclass="docblock"><p>Get the base address used for relative virtual addresses.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.entry"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#296">source</a><h4class="code-header">fn <ahref="#tymethod.entry"class="fn">entry</a>(&'file self) -><aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u64.html">u64</a></h4></section></summary><divclass="docblock"><p>Get the virtual address of the entry point of the binary.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="tymethod.flags"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#299">source</a><h4class="code-header">fn <ahref="#tymethod.flags"class="fn">flags</a>(&self) -><aclass="enum"href="../enum.FileFlags.html"title="enum object::FileFlags">FileFlags</a></h4></section></summary><divclass="docblock"><p>File flags that are specific to each file format.</p>
</div></details></div><h2id="provided-methods"class="section-header">Provided Methods<ahref="#provided-methods"class="anchor">§</a></h2><divclass="methods"><detailsclass="toggle method-toggle"open><summary><sectionid="method.sub_architecture"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#61-63">source</a><h4class="code-header">fn <ahref="#method.sub_architecture"class="fn">sub_architecture</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="../enum.SubArchitecture.html"title="enum object::SubArchitecture">SubArchitecture</a>></h4></section></summary><divclass="docblock"><p>Get the sub-architecture type of the file if known.</p>
<p>A value of <code>None</code> has a range of meanings: the file supports all
sub-architectures, the file does not explicitly specify a
sub-architecture, or the sub-architecture is currently unrecognized.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.endianness"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#67-73">source</a><h4class="code-header">fn <ahref="#method.endianness"class="fn">endianness</a>(&self) -><aclass="enum"href="../endian/enum.Endianness.html"title="enum object::endian::Endianness">Endianness</a></h4></section></summary><divclass="docblock"><p>Get the endianness of the file.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.section_by_name"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#106-108">source</a><h4class="code-header">fn <ahref="#method.section_by_name"class="fn">section_by_name</a>(&'file self, section_name: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Section"title="type object::read::Object::Section">Section</a>></h4></section></summary><divclass="docblock"><p>Get the section named <code>section_name</code>, if such a section exists.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.symbol_by_name"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#146-148">source</a><h4class="code-header">fn <ahref="#method.symbol_by_name"class="fn">symbol_by_name</a>(&'file self, symbol_name: &<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Symbol"title="type object::read::Object::Symbol">Symbol</a>></h4></section></summary><divclass="docblock"><p>Get the symbol named <code>symbol_name</code>, if the symbol exists.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.symbol_by_name_bytes"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#151-154">source</a><h4class="code-header">fn <ahref="#method.symbol_by_name_bytes"class="fn">symbol_by_name_bytes</a>(&'file self, symbol_name: &[<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>]) -><aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><Self::<aclass="associatedtype"href="trait.Object.html#associatedtype.Symbol"title="type object::read::Object::Symbol">Symbol</a>></h4></section></summary><divclass="docblock"><p>Like <ahref="trait.Object.html#method.symbol_by_name"><code>Self::symbol_by_name</code></a>, but allows names that are not UTF-8.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.symbol_map"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#182-239">source</a><h4class="code-header">fn <ahref="#method.symbol_map"class="fn">symbol_map</a>(&'file self) -><aclass="struct"href="struct.SymbolMap.html"title="struct object::read::SymbolMap">SymbolMap</a><<aclass="struct"href="struct.SymbolMapName.html"title="struct object::read::SymbolMapName">SymbolMapName</a><'data>></h4></section></summary><divclass="docblock"><p>Construct a map from addresses to symbol names.</p>
<p>The map will only contain defined text and data symbols.
The dynamic symbol table will only be used if there are no debugging symbols.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.object_map"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#244-246">source</a><h4class="code-header">fn <ahref="#method.object_map"class="fn">object_map</a>(&'file self) -><aclass="struct"href="struct.ObjectMap.html"title="struct object::read::ObjectMap">ObjectMap</a><'data></h4></section></summary><divclass="docblock"><p>Construct a map from addresses to symbol names and object file names.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.mach_uuid"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#262-264">source</a><h4class="code-header">fn <ahref="#method.mach_uuid"class="fn">mach_uuid</a>(&self) -><aclass="type"href="type.Result.html"title="type object::read::Result">Result</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><[<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>; <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.array.html">16</a>]>></h4></section></summary><divclass="docblock"><p>The UUID from a Mach-O <ahref="../macho/constant.LC_UUID.html"title="constant object::macho::LC_UUID"><code>LC_UUID</code></a> load command.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.build_id"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#268-270">source</a><h4class="code-header">fn <ahref="#method.build_id"class="fn">build_id</a>(&self) -><aclass="type"href="type.Result.html"title="type object::read::Result">Result</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'data [<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>]>></h4></section></summary><divclass="docblock"><p>The build ID from an ELF <ahref="../elf/constant.NT_GNU_BUILD_ID.html"title="constant object::elf::NT_GNU_BUILD_ID"><code>NT_GNU_BUILD_ID</code></a> note.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.gnu_debuglink"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#274-276">source</a><h4class="code-header">fn <ahref="#method.gnu_debuglink"class="fn">gnu_debuglink</a>(&self) -><aclass="type"href="type.Result.html"title="type object::read::Result">Result</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&'data [<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>], <aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u32.html">u32</a>)>></h4></section></summary><divclass="docblock"><p>The filename and CRC from a <code>.gnu_debuglink</code> section.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.gnu_debugaltlink"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#280-282">source</a><h4class="code-header">fn <ahref="#method.gnu_debugaltlink"class="fn">gnu_debugaltlink</a>(&self) -><aclass="type"href="type.Result.html"title="type object::read::Result">Result</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><(&'data [<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>], &'data [<aclass="primitive"href="https://doc.rust-lang.org/1.76.0/std/primitive.u8.html">u8</a>])>></h4></section></summary><divclass="docblock"><p>The filename and build ID from a <code>.gnu_debugaltlink</code> section.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.pdb_info"class="method"><aclass="src rightside"href="../../src/object/read/traits.rs.html#286-288">source</a><h4class="code-header">fn <ahref="#method.pdb_info"class="fn">pdb_info</a>(&self) -><aclass="type"href="type.Result.html"title="type object::read::Result">Result</a><<aclass="enum"href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="struct.CodeView.html"title="struct object::read::CodeView">CodeView</a><'_>>></h4></section></summary><divclass="docblock"><p>The filename and GUID from the PE CodeView section.</p>