Files
rust-gpu/api/object/write/elf/struct.Writer.html
2026-04-13 16:52:47 +00:00

377 lines
120 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A helper for writing ELF files."><title>Writer in object::write::elf - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="object" data-themes="" data-resource-suffix="" data-rustdoc-version="1.96.0-nightly (02c7f9bec 2026-04-10)" data-channel="nightly" data-search-js="search-b5634cc7.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-5013f961.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Writer</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../object/index.html">object</a><span class="version">0.37.3</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Writer</a></h2><h3><a href="#implementations">Associated Functions</a></h3><ul class="block method"><li><a href="#method.new" title="new">new</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.add_dynamic_string" title="add_dynamic_string">add_dynamic_string</a></li><li><a href="#method.add_section_name" title="add_section_name">add_section_name</a></li><li><a href="#method.add_string" title="add_string">add_string</a></li><li><a href="#method.attributes_writer" title="attributes_writer">attributes_writer</a></li><li><a href="#method.dynamic_symbol_count" title="dynamic_symbol_count">dynamic_symbol_count</a></li><li><a href="#method.dynstr_index" title="dynstr_index">dynstr_index</a></li><li><a href="#method.dynstr_len" title="dynstr_len">dynstr_len</a></li><li><a href="#method.dynstr_needed" title="dynstr_needed">dynstr_needed</a></li><li><a href="#method.dynsym_index" title="dynsym_index">dynsym_index</a></li><li><a href="#method.get_dynamic_string" title="get_dynamic_string">get_dynamic_string</a></li><li><a href="#method.len" title="len">len</a></li><li><a href="#method.pad_until" title="pad_until">pad_until</a></li><li><a href="#method.require_dynstr" title="require_dynstr">require_dynstr</a></li><li><a href="#method.require_strtab" title="require_strtab">require_strtab</a></li><li><a href="#method.require_symtab_shndx" title="require_symtab_shndx">require_symtab_shndx</a></li><li><a href="#method.reserve" title="reserve">reserve</a></li><li><a href="#method.reserve_comdat" title="reserve_comdat">reserve_comdat</a></li><li><a href="#method.reserve_dynamic" title="reserve_dynamic">reserve_dynamic</a></li><li><a href="#method.reserve_dynamic_section_index" title="reserve_dynamic_section_index">reserve_dynamic_section_index</a></li><li><a href="#method.reserve_dynamic_symbol_index" title="reserve_dynamic_symbol_index">reserve_dynamic_symbol_index</a></li><li><a href="#method.reserve_dynamics" title="reserve_dynamics">reserve_dynamics</a></li><li><a href="#method.reserve_dynstr" title="reserve_dynstr">reserve_dynstr</a></li><li><a href="#method.reserve_dynstr_section_index" title="reserve_dynstr_section_index">reserve_dynstr_section_index</a></li><li><a href="#method.reserve_dynstr_section_index_with_name" title="reserve_dynstr_section_index_with_name">reserve_dynstr_section_index_with_name</a></li><li><a href="#method.reserve_dynsym" title="reserve_dynsym">reserve_dynsym</a></li><li><a href="#method.reserve_dynsym_section_index" title="reserve_dynsym_section_index">reserve_dynsym_section_index</a></li><li><a href="#method.reserve_dynsym_section_index_with_name" title="reserve_dynsym_section_index_with_name">reserve_dynsym_section_index_with_name</a></li><li><a href="#method.reserve_file_header" title="reserve_file_header">reserve_file_header</a></li><li><a href="#method.reserve_gnu_attributes" title="reserve_gnu_attributes">reserve_gnu_attributes</a></li><li><a href="#method.reserve_gnu_attributes_section_index" title="reserve_gnu_attributes_section_index">reserve_gnu_attributes_section_index</a></li><li><a href="#method.reserve_gnu_attributes_section_index_with_name" title="reserve_gnu_attributes_section_index_with_name">reserve_gnu_attributes_section_index_with_name</a></li><li><a href="#method.reserve_gnu_hash" title="reserve_gnu_hash">reserve_gnu_hash</a></li><li><a href="#method.reserve_gnu_hash_section_index" title="reserve_gnu_hash_section_index">reserve_gnu_hash_section_index</a></li><li><a href="#method.reserve_gnu_hash_section_index_with_name" title="reserve_gnu_hash_section_index_with_name">reserve_gnu_hash_section_index_with_name</a></li><li><a href="#method.reserve_gnu_verdef" title="reserve_gnu_verdef">reserve_gnu_verdef</a></li><li><a href="#method.reserve_gnu_verdef_section_index" title="reserve_gnu_verdef_section_index">reserve_gnu_verdef_section_index</a></li><li><a href="#method.reserve_gnu_verdef_section_index_with_name" title="reserve_gnu_verdef_section_index_with_name">reserve_gnu_verdef_section_index_with_name</a></li><li><a href="#method.reserve_gnu_verneed" title="reserve_gnu_verneed">reserve_gnu_verneed</a></li><li><a href="#method.reserve_gnu_verneed_section_index" title="reserve_gnu_verneed_section_index">reserve_gnu_verneed_section_index</a></li><li><a href="#method.reserve_gnu_verneed_section_index_with_name" title="reserve_gnu_verneed_section_index_with_name">reserve_gnu_verneed_section_index_with_name</a></li><li><a href="#method.reserve_gnu_versym" title="reserve_gnu_versym">reserve_gnu_versym</a></li><li><a href="#method.reserve_gnu_versym_section_index" title="reserve_gnu_versym_section_index">reserve_gnu_versym_section_index</a></li><li><a href="#method.reserve_gnu_versym_section_index_with_name" title="reserve_gnu_versym_section_index_with_name">reserve_gnu_versym_section_index_with_name</a></li><li><a href="#method.reserve_hash" title="reserve_hash">reserve_hash</a></li><li><a href="#method.reserve_hash_section_index" title="reserve_hash_section_index">reserve_hash_section_index</a></li><li><a href="#method.reserve_hash_section_index_with_name" title="reserve_hash_section_index_with_name">reserve_hash_section_index_with_name</a></li><li><a href="#method.reserve_null_dynamic_symbol_index" title="reserve_null_dynamic_symbol_index">reserve_null_dynamic_symbol_index</a></li><li><a href="#method.reserve_null_section_index" title="reserve_null_section_index">reserve_null_section_index</a></li><li><a href="#method.reserve_null_symbol_index" title="reserve_null_symbol_index">reserve_null_symbol_index</a></li><li><a href="#method.reserve_program_headers" title="reserve_program_headers">reserve_program_headers</a></li><li><a href="#method.reserve_relocations" title="reserve_relocations">reserve_relocations</a></li><li><a href="#method.reserve_section_headers" title="reserve_section_headers">reserve_section_headers</a></li><li><a href="#method.reserve_section_index" title="reserve_section_index">reserve_section_index</a></li><li><a href="#method.reserve_shstrtab" title="reserve_shstrtab">reserve_shstrtab</a></li><li><a href="#method.reserve_shstrtab_section_index" title="reserve_shstrtab_section_index">reserve_shstrtab_section_index</a></li><li><a href="#method.reserve_shstrtab_section_index_with_name" title="reserve_shstrtab_section_index_with_name">reserve_shstrtab_section_index_with_name</a></li><li><a href="#method.reserve_strtab" title="reserve_strtab">reserve_strtab</a></li><li><a href="#method.reserve_strtab_section_index" title="reserve_strtab_section_index">reserve_strtab_section_index</a></li><li><a href="#method.reserve_strtab_section_index_with_name" title="reserve_strtab_section_index_with_name">reserve_strtab_section_index_with_name</a></li><li><a href="#method.reserve_symbol_index" title="reserve_symbol_index">reserve_symbol_index</a></li><li><a href="#method.reserve_symtab" title="reserve_symtab">reserve_symtab</a></li><li><a href="#method.reserve_symtab_section_index" title="reserve_symtab_section_index">reserve_symtab_section_index</a></li><li><a href="#method.reserve_symtab_section_index_with_name" title="reserve_symtab_section_index_with_name">reserve_symtab_section_index_with_name</a></li><li><a href="#method.reserve_symtab_shndx" title="reserve_symtab_shndx">reserve_symtab_shndx</a></li><li><a href="#method.reserve_symtab_shndx_section_index" title="reserve_symtab_shndx_section_index">reserve_symtab_shndx_section_index</a></li><li><a href="#method.reserve_symtab_shndx_section_index_with_name" title="reserve_symtab_shndx_section_index_with_name">reserve_symtab_shndx_section_index_with_name</a></li><li><a href="#method.reserve_until" title="reserve_until">reserve_until</a></li><li><a href="#method.reserved_len" title="reserved_len">reserved_len</a></li><li><a href="#method.strtab_needed" title="strtab_needed">strtab_needed</a></li><li><a href="#method.symbol_count" title="symbol_count">symbol_count</a></li><li><a href="#method.symtab_index" title="symtab_index">symtab_index</a></li><li><a href="#method.symtab_shndx_needed" title="symtab_shndx_needed">symtab_shndx_needed</a></li><li><a href="#method.write" title="write">write</a></li><li><a href="#method.write_align" title="write_align">write_align</a></li><li><a href="#method.write_align_dynamic" title="write_align_dynamic">write_align_dynamic</a></li><li><a href="#method.write_align_gnu_verdef" title="write_align_gnu_verdef">write_align_gnu_verdef</a></li><li><a href="#method.write_align_gnu_verneed" title="write_align_gnu_verneed">write_align_gnu_verneed</a></li><li><a href="#method.write_align_program_headers" title="write_align_program_headers">write_align_program_headers</a></li><li><a href="#method.write_align_relocation" title="write_align_relocation">write_align_relocation</a></li><li><a href="#method.write_comdat_entry" title="write_comdat_entry">write_comdat_entry</a></li><li><a href="#method.write_comdat_header" title="write_comdat_header">write_comdat_header</a></li><li><a href="#method.write_comdat_section_header" title="write_comdat_section_header">write_comdat_section_header</a></li><li><a href="#method.write_dynamic" title="write_dynamic">write_dynamic</a></li><li><a href="#method.write_dynamic_section_header" title="write_dynamic_section_header">write_dynamic_section_header</a></li><li><a href="#method.write_dynamic_string" title="write_dynamic_string">write_dynamic_string</a></li><li><a href="#method.write_dynamic_symbol" title="write_dynamic_symbol">write_dynamic_symbol</a></li><li><a href="#method.write_dynstr" title="write_dynstr">write_dynstr</a></li><li><a href="#method.write_dynstr_section_header" title="write_dynstr_section_header">write_dynstr_section_header</a></li><li><a href="#method.write_dynsym_section_header" title="write_dynsym_section_header">write_dynsym_section_header</a></li><li><a href="#method.write_file_header" title="write_file_header">write_file_header</a></li><li><a href="#method.write_gnu_attributes" title="write_gnu_attributes">write_gnu_attributes</a></li><li><a href="#method.write_gnu_attributes_section_header" title="write_gnu_attributes_section_header">write_gnu_attributes_section_header</a></li><li><a href="#method.write_gnu_hash" title="write_gnu_hash">write_gnu_hash</a></li><li><a href="#method.write_gnu_hash_section_header" title="write_gnu_hash_section_header">write_gnu_hash_section_header</a></li><li><a href="#method.write_gnu_verdaux" title="write_gnu_verdaux">write_gnu_verdaux</a></li><li><a href="#method.write_gnu_verdef" title="write_gnu_verdef">write_gnu_verdef</a></li><li><a href="#method.write_gnu_verdef_section_header" title="write_gnu_verdef_section_header">write_gnu_verdef_section_header</a></li><li><a href="#method.write_gnu_verdef_shared" title="write_gnu_verdef_shared">write_gnu_verdef_shared</a></li><li><a href="#method.write_gnu_vernaux" title="write_gnu_vernaux">write_gnu_vernaux</a></li><li><a href="#method.write_gnu_verneed" title="write_gnu_verneed">write_gnu_verneed</a></li><li><a href="#method.write_gnu_verneed_section_header" title="write_gnu_verneed_section_header">write_gnu_verneed_section_header</a></li><li><a href="#method.write_gnu_versym" title="write_gnu_versym">write_gnu_versym</a></li><li><a href="#method.write_gnu_versym_section_header" title="write_gnu_versym_section_header">write_gnu_versym_section_header</a></li><li><a href="#method.write_hash" title="write_hash">write_hash</a></li><li><a href="#method.write_hash_section_header" title="write_hash_section_header">write_hash_section_header</a></li><li><a href="#method.write_null_dynamic_symbol" title="write_null_dynamic_symbol">write_null_dynamic_symbol</a></li><li><a href="#method.write_null_gnu_versym" title="write_null_gnu_versym">write_null_gnu_versym</a></li><li><a href="#method.write_null_section_header" title="write_null_section_header">write_null_section_header</a></li><li><a href="#method.write_null_symbol" title="write_null_symbol">write_null_symbol</a></li><li><a href="#method.write_program_header" title="write_program_header">write_program_header</a></li><li><a href="#method.write_relative_relocation_section_header" title="write_relative_relocation_section_header">write_relative_relocation_section_header</a></li><li><a href="#method.write_relocation" title="write_relocation">write_relocation</a></li><li><a href="#method.write_relocation_section_header" title="write_relocation_section_header">write_relocation_section_header</a></li><li><a href="#method.write_section_header" title="write_section_header">write_section_header</a></li><li><a href="#method.write_shstrtab" title="write_shstrtab">write_shstrtab</a></li><li><a href="#method.write_shstrtab_section_header" title="write_shstrtab_section_header">write_shstrtab_section_header</a></li><li><a href="#method.write_strtab" title="write_strtab">write_strtab</a></li><li><a href="#method.write_strtab_section_header" title="write_strtab_section_header">write_strtab_section_header</a></li><li><a href="#method.write_symbol" title="write_symbol">write_symbol</a></li><li><a href="#method.write_symtab_section_header" title="write_symtab_section_header">write_symtab_section_header</a></li><li><a href="#method.write_symtab_shndx" title="write_symtab_shndx">write_symtab_shndx</a></li><li><a href="#method.write_symtab_shndx_section_header" title="write_symtab_shndx_section_header">write_symtab_shndx_section_header</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-Writer%3C'a%3E" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-Send-for-Writer%3C'a%3E" title="!Send">!Send</a></li><li><a href="#impl-Sync-for-Writer%3C'a%3E" title="!Sync">!Sync</a></li><li><a href="#impl-UnwindSafe-for-Writer%3C'a%3E" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Freeze-for-Writer%3C'a%3E" title="Freeze">Freeze</a></li><li><a href="#impl-Unpin-for-Writer%3C'a%3E" title="Unpin">Unpin</a></li><li><a href="#impl-UnsafeUnpin-for-Writer%3C'a%3E" title="UnsafeUnpin">UnsafeUnpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In object::<wbr>write::<wbr>elf</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">object</a>::<wbr><a href="../index.html">write</a>::<wbr><a href="index.html">elf</a></div><h1>Struct <span class="struct">Writer</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/object/write/elf/writer.rs.html#45-127">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Writer&lt;'a&gt; { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A helper for writing ELF files.</p>
<p>Writing uses a two phase approach. The first phase builds up all of the information
that may need to be known ahead of time:</p>
<ul>
<li>build string tables</li>
<li>reserve section indices</li>
<li>reserve symbol indices</li>
<li>reserve file ranges for headers and sections</li>
</ul>
<p>Some of the information has ordering requirements. For example, strings must be added
to string tables before reserving the file range for the string table. Symbol indices
must be reserved after reserving the section indices they reference. There are debug
asserts to check some of these requirements.</p>
<p>The second phase writes everything out in order. Thus the caller must ensure writing
is in the same order that file ranges were reserved. There are debug asserts to assist
with checking this.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Writer%3C'a%3E" class="impl"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#129-2052">Source</a><a href="#impl-Writer%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="struct" href="struct.Writer.html" title="struct object::write::elf::Writer">Writer</a>&lt;'a&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#131-217">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(
endian: <a class="enum" href="../../endian/enum.Endianness.html" title="enum object::endian::Endianness">Endianness</a>,
is_64: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
buffer: &amp;'a mut dyn <a class="trait" href="../trait.WritableBuffer.html" title="trait object::write::WritableBuffer">WritableBuffer</a>,
) -&gt; Self</h4></section></summary><div class="docblock"><p>Create a new <code>Writer</code> for the given endianness and ELF class.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserved_len" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#225-227">Source</a><h4 class="code-header">pub fn <a href="#method.reserved_len" class="fn">reserved_len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Return the current file length that has been reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.len" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#231-233">Source</a><h4 class="code-header">pub fn <a href="#method.len" class="fn">len</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Return the current file length that has been written.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#240-247">Source</a><h4 class="code-header">pub fn <a href="#method.reserve" class="fn">reserve</a>(&amp;mut self, len: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, align_start: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve a file range with the given size and starting alignment.</p>
<p>Returns the aligned offset of the start of the range.</p>
<p><code>align_start</code> must be a power of two.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_align" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#250-254">Source</a><h4 class="code-header">pub fn <a href="#method.write_align" class="fn">write_align</a>(&amp;mut self, align_start: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Write alignment padding bytes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#259-261">Source</a><h4 class="code-header">pub fn <a href="#method.write" class="fn">write</a>(&amp;mut self, data: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Write data.</p>
<p>This is typically used to write section data.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_until" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#264-267">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_until" class="fn">reserve_until</a>(&amp;mut self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Reserve the file range up to the given file offset.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pad_until" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#270-273">Source</a><h4 class="code-header">pub fn <a href="#method.pad_until" class="fn">pad_until</a>(&amp;mut self, offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Write padding up to the given file offset.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_file_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#278-281">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_file_header" class="fn">reserve_file_header</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Reserve the range for the file header.</p>
<p>This must be at the start of the file.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_file_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#288-386">Source</a><h4 class="code-header">pub fn <a href="#method.write_file_header" class="fn">write_file_header</a>(&amp;mut self, header: &amp;<a class="struct" href="struct.FileHeader.html" title="struct object::write::elf::FileHeader">FileHeader</a>) -&gt; <a class="type" href="../type.Result.html" title="type object::write::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;</h4></section></summary><div class="docblock"><p>Write the file header.</p>
<p>This must be at the start of the file.</p>
<p>Fields that can be derived from known information are automatically set by this function.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_program_headers" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#389-399">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_program_headers" class="fn">reserve_program_headers</a>(&amp;mut self, num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Reserve the range for the program headers.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_align_program_headers" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#402-408">Source</a><h4 class="code-header">pub fn <a href="#method.write_align_program_headers" class="fn">write_align_program_headers</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write alignment padding bytes prior to the program headers.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_program_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#411-438">Source</a><h4 class="code-header">pub fn <a href="#method.write_program_header" class="fn">write_program_header</a>(&amp;mut self, header: &amp;<a class="struct" href="struct.ProgramHeader.html" title="struct object::write::elf::ProgramHeader">ProgramHeader</a>)</h4></section></summary><div class="docblock"><p>Write a program header.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_null_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#446-452">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_null_section_index" class="fn">reserve_null_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the null section header.</p>
<p>The null section header is usually automatically reserved,
but this can be used to force an empty section table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#459-467">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_section_index" class="fn">reserve_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve a section table index.</p>
<p>Automatically also reserves the null section header if required.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_section_headers" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#474-483">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_section_headers" class="fn">reserve_section_headers</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Reserve the range for the section headers.</p>
<p>This function does nothing if no sections were reserved.
This must be called after <a href="struct.Writer.html#method.reserve_section_index" title="method object::write::elf::Writer::reserve_section_index"><code>Self::reserve_section_index</code></a>
and other functions that reserve section indices.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_null_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#489-516">Source</a><h4 class="code-header">pub fn <a href="#method.write_null_section_header" class="fn">write_null_section_header</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the null section header.</p>
<p>This must be the first section header that is written.
This function does nothing if no sections were reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#519-555">Source</a><h4 class="code-header">pub fn <a href="#method.write_section_header" class="fn">write_section_header</a>(&amp;mut self, section: &amp;<a class="struct" href="struct.SectionHeader.html" title="struct object::write::elf::SectionHeader">SectionHeader</a>)</h4></section></summary><div class="docblock"><p>Write a section header.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_section_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#562-565">Source</a><h4 class="code-header">pub fn <a href="#method.add_section_name" class="fn">add_section_name</a>(&amp;mut self, name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a></h4></section></summary><div class="docblock"><p>Add a section name to the section header string table.</p>
<p>This will be stored in the <code>.shstrtab</code> section.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_shstrtab" title="method object::write::elf::Writer::reserve_shstrtab"><code>Self::reserve_shstrtab</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_shstrtab" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#574-583">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_shstrtab" class="fn">reserve_shstrtab</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Reserve the range for the section header string table.</p>
<p>This range is used for a section named <code>.shstrtab</code>.</p>
<p>This function does nothing if no sections were reserved.
This must be called after <a href="struct.Writer.html#method.add_section_name" title="method object::write::elf::Writer::add_section_name"><code>Self::add_section_name</code></a>.
and other functions that reserve section names and indices.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_shstrtab" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#588-594">Source</a><h4 class="code-header">pub fn <a href="#method.write_shstrtab" class="fn">write_shstrtab</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the section header string table.</p>
<p>This function does nothing if the section was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_shstrtab_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#600-602">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_shstrtab_section_index" class="fn">reserve_shstrtab_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the section header string table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_shstrtab" title="method object::write::elf::Writer::reserve_shstrtab"><code>Self::reserve_shstrtab</code></a>
and <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_shstrtab_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#608-613">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_shstrtab_section_index_with_name" class="fn">reserve_shstrtab_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the section header string table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_shstrtab" title="method object::write::elf::Writer::reserve_shstrtab"><code>Self::reserve_shstrtab</code></a>
and <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_shstrtab_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#618-634">Source</a><h4 class="code-header">pub fn <a href="#method.write_shstrtab_section_header" class="fn">write_shstrtab_section_header</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the section header for the section header string table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_string" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#641-645">Source</a><h4 class="code-header">pub fn <a href="#method.add_string" class="fn">add_string</a>(&amp;mut self, name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a></h4></section></summary><div class="docblock"><p>Add a string to the string table.</p>
<p>This will be stored in the <code>.strtab</code> section.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_strtab" title="method object::write::elf::Writer::reserve_strtab"><code>Self::reserve_strtab</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.strtab_needed" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#648-650">Source</a><h4 class="code-header">pub fn <a href="#method.strtab_needed" class="fn">strtab_needed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Return true if <code>.strtab</code> is needed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.require_strtab" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#653-655">Source</a><h4 class="code-header">pub fn <a href="#method.require_strtab" class="fn">require_strtab</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Require the string table even if no strings were added.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_strtab" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#663-672">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_strtab" class="fn">reserve_strtab</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Reserve the range for the string table.</p>
<p>This range is used for a section named <code>.strtab</code>.</p>
<p>This function does nothing if a string table is not required.
This must be called after <a href="struct.Writer.html#method.add_string" title="method object::write::elf::Writer::add_string"><code>Self::add_string</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_strtab" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#677-683">Source</a><h4 class="code-header">pub fn <a href="#method.write_strtab" class="fn">write_strtab</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the string table.</p>
<p>This function does nothing if the section was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_strtab_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#691-693">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_strtab_section_index" class="fn">reserve_strtab_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the string table.</p>
<p>You should check <a href="struct.Writer.html#method.strtab_needed" title="method object::write::elf::Writer::strtab_needed"><code>Self::strtab_needed</code></a> before calling this
unless you have other means of knowing if this section is needed.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_strtab_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#701-706">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_strtab_section_index_with_name" class="fn">reserve_strtab_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the string table.</p>
<p>You should check <a href="struct.Writer.html#method.strtab_needed" title="method object::write::elf::Writer::strtab_needed"><code>Self::strtab_needed</code></a> before calling this
unless you have other means of knowing if this section is needed.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_strtab_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#711-727">Source</a><h4 class="code-header">pub fn <a href="#method.write_strtab_section_header" class="fn">write_strtab_section_header</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the section header for the string table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_null_symbol_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#737-744">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_null_symbol_index" class="fn">reserve_null_symbol_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SymbolIndex.html" title="struct object::write::elf::SymbolIndex">SymbolIndex</a></h4></section></summary><div class="docblock"><p>Reserve the null symbol table entry.</p>
<p>This will be stored in the <code>.symtab</code> section.</p>
<p>The null symbol table entry is usually automatically reserved,
but this can be used to force an empty symbol table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_symtab" title="method object::write::elf::Writer::reserve_symtab"><code>Self::reserve_symtab</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_symbol_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#758-774">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_symbol_index" class="fn">reserve_symbol_index</a>(
&amp;mut self,
section_index: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a>&gt;,
) -&gt; <a class="struct" href="struct.SymbolIndex.html" title="struct object::write::elf::SymbolIndex">SymbolIndex</a></h4></section></summary><div class="docblock"><p>Reserve a symbol table entry.</p>
<p>This will be stored in the <code>.symtab</code> section.</p>
<p><code>section_index</code> is used to determine whether <code>.symtab_shndx</code> is required.</p>
<p>Automatically also reserves the null symbol if required.
Callers may assume that the returned indices will be sequential
starting at 1.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_symtab" title="method object::write::elf::Writer::reserve_symtab"><code>Self::reserve_symtab</code></a> and
<a href="struct.Writer.html#method.reserve_symtab_shndx" title="method object::write::elf::Writer::reserve_symtab_shndx"><code>Self::reserve_symtab_shndx</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.symbol_count" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#779-781">Source</a><h4 class="code-header">pub fn <a href="#method.symbol_count" class="fn">symbol_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Return the number of reserved symbol table entries.</p>
<p>Includes the null symbol.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_symtab" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#788-797">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_symtab" class="fn">reserve_symtab</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Reserve the range for the symbol table.</p>
<p>This range is used for a section named <code>.symtab</code>.
This function does nothing if no symbols were reserved.
This must be called after <a href="struct.Writer.html#method.reserve_symbol_index" title="method object::write::elf::Writer::reserve_symbol_index"><code>Self::reserve_symbol_index</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_null_symbol" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#803-818">Source</a><h4 class="code-header">pub fn <a href="#method.write_null_symbol" class="fn">write_null_symbol</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the null symbol.</p>
<p>This must be the first symbol that is written.
This function does nothing if no symbols were reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_symbol" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#821-865">Source</a><h4 class="code-header">pub fn <a href="#method.write_symbol" class="fn">write_symbol</a>(&amp;mut self, sym: &amp;<a class="struct" href="struct.Sym.html" title="struct object::write::elf::Sym">Sym</a>)</h4></section></summary><div class="docblock"><p>Write a symbol.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_symtab_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#870-872">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_symtab_section_index" class="fn">reserve_symtab_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the symbol table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_symtab_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#877-882">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_symtab_section_index_with_name" class="fn">reserve_symtab_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the symbol table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.symtab_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#885-887">Source</a><h4 class="code-header">pub fn <a href="#method.symtab_index" class="fn">symtab_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Return the section index of the symbol table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_symtab_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#892-908">Source</a><h4 class="code-header">pub fn <a href="#method.write_symtab_section_header" class="fn">write_symtab_section_header</a>(&amp;mut self, num_local: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the symbol table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.symtab_shndx_needed" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#911-913">Source</a><h4 class="code-header">pub fn <a href="#method.symtab_shndx_needed" class="fn">symtab_shndx_needed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Return true if <code>.symtab_shndx</code> is needed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.require_symtab_shndx" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#917-919">Source</a><h4 class="code-header">pub fn <a href="#method.require_symtab_shndx" class="fn">require_symtab_shndx</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Require the extended section indices for the symbol table even
if no section indices are too large.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_symtab_shndx" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#928-935">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_symtab_shndx" class="fn">reserve_symtab_shndx</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Reserve the range for the extended section indices for the symbol table.</p>
<p>This range is used for a section named <code>.symtab_shndx</code>.
This also reserves a section index.</p>
<p>This function does nothing if extended section indices are not needed.
This must be called after <a href="struct.Writer.html#method.reserve_symbol_index" title="method object::write::elf::Writer::reserve_symbol_index"><code>Self::reserve_symbol_index</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_symtab_shndx" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#940-948">Source</a><h4 class="code-header">pub fn <a href="#method.write_symtab_shndx" class="fn">write_symtab_shndx</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the extended section indices for the symbol table.</p>
<p>This function does nothing if the section was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_symtab_shndx_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#956-958">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_symtab_shndx_section_index" class="fn">reserve_symtab_shndx_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the extended section indices symbol table.</p>
<p>You should check <a href="struct.Writer.html#method.symtab_shndx_needed" title="method object::write::elf::Writer::symtab_shndx_needed"><code>Self::symtab_shndx_needed</code></a> before calling this
unless you have other means of knowing if this section is needed.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_symtab_shndx_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#966-970">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_symtab_shndx_section_index_with_name" class="fn">reserve_symtab_shndx_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the extended section indices symbol table.</p>
<p>You should check <a href="struct.Writer.html#method.symtab_shndx_needed" title="method object::write::elf::Writer::symtab_shndx_needed"><code>Self::symtab_shndx_needed</code></a> before calling this
unless you have other means of knowing if this section is needed.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_symtab_shndx_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#975-996">Source</a><h4 class="code-header">pub fn <a href="#method.write_symtab_shndx_section_header" class="fn">write_symtab_shndx_section_header</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the section header for the extended section indices for the symbol table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_dynamic_string" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1003-1007">Source</a><h4 class="code-header">pub fn <a href="#method.add_dynamic_string" class="fn">add_dynamic_string</a>(&amp;mut self, name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a></h4></section></summary><div class="docblock"><p>Add a string to the dynamic string table.</p>
<p>This will be stored in the <code>.dynstr</code> section.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_dynstr" title="method object::write::elf::Writer::reserve_dynstr"><code>Self::reserve_dynstr</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.get_dynamic_string" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1012-1014">Source</a><h4 class="code-header">pub fn <a href="#method.get_dynamic_string" class="fn">get_dynamic_string</a>(&amp;self, name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a></h4></section></summary><div class="docblock"><p>Get a string that was previously added to the dynamic string table.</p>
<p>Panics if the string was not added.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dynstr_needed" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1017-1019">Source</a><h4 class="code-header">pub fn <a href="#method.dynstr_needed" class="fn">dynstr_needed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Return true if <code>.dynstr</code> is needed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.require_dynstr" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1022-1024">Source</a><h4 class="code-header">pub fn <a href="#method.require_dynstr" class="fn">require_dynstr</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Require the dynamic string table even if no strings were added.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynstr" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1032-1042">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynstr" class="fn">reserve_dynstr</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve the range for the dynamic string table.</p>
<p>This range is used for a section named <code>.dynstr</code>.</p>
<p>This function does nothing if no dynamic strings were defined.
This must be called after <a href="struct.Writer.html#method.add_dynamic_string" title="method object::write::elf::Writer::add_dynamic_string"><code>Self::add_dynamic_string</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dynstr_len" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1047-1050">Source</a><h4 class="code-header">pub fn <a href="#method.dynstr_len" class="fn">dynstr_len</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Return the size of the dynamic string table.</p>
<p>This must be called after <a href="struct.Writer.html#method.reserve_dynstr" title="method object::write::elf::Writer::reserve_dynstr"><code>Self::reserve_dynstr</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_dynstr" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1055-1061">Source</a><h4 class="code-header">pub fn <a href="#method.write_dynstr" class="fn">write_dynstr</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the dynamic string table.</p>
<p>This function does nothing if the section was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynstr_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1069-1071">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynstr_section_index" class="fn">reserve_dynstr_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the dynamic string table.</p>
<p>You should check <a href="struct.Writer.html#method.dynstr_needed" title="method object::write::elf::Writer::dynstr_needed"><code>Self::dynstr_needed</code></a> before calling this
unless you have other means of knowing if this section is needed.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynstr_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1079-1084">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynstr_section_index_with_name" class="fn">reserve_dynstr_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the dynamic string table.</p>
<p>You should check <a href="struct.Writer.html#method.dynstr_needed" title="method object::write::elf::Writer::dynstr_needed"><code>Self::dynstr_needed</code></a> before calling this
unless you have other means of knowing if this section is needed.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dynstr_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1087-1089">Source</a><h4 class="code-header">pub fn <a href="#method.dynstr_index" class="fn">dynstr_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Return the section index of the dynamic string table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_dynstr_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1094-1110">Source</a><h4 class="code-header">pub fn <a href="#method.write_dynstr_section_header" class="fn">write_dynstr_section_header</a>(&amp;mut self, sh_addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the dynamic string table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_null_dynamic_symbol_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1120-1125">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_null_dynamic_symbol_index" class="fn">reserve_null_dynamic_symbol_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SymbolIndex.html" title="struct object::write::elf::SymbolIndex">SymbolIndex</a></h4></section></summary><div class="docblock"><p>Reserve the null dynamic symbol table entry.</p>
<p>This will be stored in the <code>.dynsym</code> section.</p>
<p>The null dynamic symbol table entry is usually automatically reserved,
but this can be used to force an empty dynamic symbol table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_dynsym" title="method object::write::elf::Writer::reserve_dynsym"><code>Self::reserve_dynsym</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynamic_symbol_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1136-1144">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynamic_symbol_index" class="fn">reserve_dynamic_symbol_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SymbolIndex.html" title="struct object::write::elf::SymbolIndex">SymbolIndex</a></h4></section></summary><div class="docblock"><p>Reserve a dynamic symbol table entry.</p>
<p>This will be stored in the <code>.dynsym</code> section.</p>
<p>Automatically also reserves the null symbol if required.
Callers may assume that the returned indices will be sequential
starting at 1.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_dynsym" title="method object::write::elf::Writer::reserve_dynsym"><code>Self::reserve_dynsym</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dynamic_symbol_count" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1149-1151">Source</a><h4 class="code-header">pub fn <a href="#method.dynamic_symbol_count" class="fn">dynamic_symbol_count</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Return the number of reserved dynamic symbols.</p>
<p>Includes the null symbol.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynsym" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1159-1169">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynsym" class="fn">reserve_dynsym</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve the range for the dynamic symbol table.</p>
<p>This range is used for a section named <code>.dynsym</code>.</p>
<p>This function does nothing if no dynamic symbols were reserved.
This must be called after <a href="struct.Writer.html#method.reserve_dynamic_symbol_index" title="method object::write::elf::Writer::reserve_dynamic_symbol_index"><code>Self::reserve_dynamic_symbol_index</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_null_dynamic_symbol" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1175-1186">Source</a><h4 class="code-header">pub fn <a href="#method.write_null_dynamic_symbol" class="fn">write_null_dynamic_symbol</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the null dynamic symbol.</p>
<p>This must be the first dynamic symbol that is written.
This function does nothing if no dynamic symbols were reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_dynamic_symbol" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1189-1230">Source</a><h4 class="code-header">pub fn <a href="#method.write_dynamic_symbol" class="fn">write_dynamic_symbol</a>(&amp;mut self, sym: &amp;<a class="struct" href="struct.Sym.html" title="struct object::write::elf::Sym">Sym</a>)</h4></section></summary><div class="docblock"><p>Write a dynamic symbol.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynsym_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1235-1237">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynsym_section_index" class="fn">reserve_dynsym_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the dynamic symbol table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynsym_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1242-1247">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynsym_section_index_with_name" class="fn">reserve_dynsym_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the dynamic symbol table.</p>
<p>This must be called before <a href="struct.Writer.html#method.reserve_section_headers" title="method object::write::elf::Writer::reserve_section_headers"><code>Self::reserve_section_headers</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.dynsym_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1250-1252">Source</a><h4 class="code-header">pub fn <a href="#method.dynsym_index" class="fn">dynsym_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Return the section index of the dynamic symbol table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_dynsym_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1257-1273">Source</a><h4 class="code-header">pub fn <a href="#method.write_dynsym_section_header" class="fn">write_dynsym_section_header</a>(&amp;mut self, sh_addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, num_local: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the dynamic symbol table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynamic" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1278-1286">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynamic" class="fn">reserve_dynamic</a>(&amp;mut self, dynamic_num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve the range for the <code>.dynamic</code> section.</p>
<p>This function does nothing if <code>dynamic_num</code> is zero.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_align_dynamic" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1291-1297">Source</a><h4 class="code-header">pub fn <a href="#method.write_align_dynamic" class="fn">write_align_dynamic</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write alignment padding bytes prior to the <code>.dynamic</code> section.</p>
<p>This function does nothing if the section was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynamics" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1302-1304">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynamics" class="fn">reserve_dynamics</a>(&amp;mut self, dynamic_num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve a file range for the given number of dynamic entries.</p>
<p>Returns the offset of the range.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_dynamic_string" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1307-1309">Source</a><h4 class="code-header">pub fn <a href="#method.write_dynamic_string" class="fn">write_dynamic_string</a>(&amp;mut self, tag: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, id: <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a>)</h4></section></summary><div class="docblock"><p>Write a dynamic string entry.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_dynamic" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1312-1327">Source</a><h4 class="code-header">pub fn <a href="#method.write_dynamic" class="fn">write_dynamic</a>(&amp;mut self, d_tag: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, d_val: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Write a dynamic value entry.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_dynamic_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1330-1334">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_dynamic_section_index" class="fn">reserve_dynamic_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the dynamic table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_dynamic_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1339-1355">Source</a><h4 class="code-header">pub fn <a href="#method.write_dynamic_section_header" class="fn">write_dynamic_section_header</a>(&amp;mut self, sh_addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the dynamic table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_hash" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1361-1365">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_hash" class="fn">reserve_hash</a>(&amp;mut self, bucket_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, chain_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve a file range for a SysV hash section.</p>
<p><code>symbol_count</code> is the number of symbols in the hash,
not the total number of symbols.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_hash" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1371-1393">Source</a><h4 class="code-header">pub fn <a href="#method.write_hash" class="fn">write_hash</a>&lt;F&gt;(&amp;mut self, bucket_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, chain_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, hash: F)<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>&gt;,</div></h4></section></summary><div class="docblock"><p>Write a SysV hash section.</p>
<p><code>chain_count</code> is the number of symbols in the hash.
The argument to <code>hash</code> will be in the range <code>0..chain_count</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_hash_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1396-1398">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_hash_section_index" class="fn">reserve_hash_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the SysV hash table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_hash_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1401-1405">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_hash_section_index_with_name" class="fn">reserve_hash_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the SysV hash table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_hash_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1410-1426">Source</a><h4 class="code-header">pub fn <a href="#method.write_hash_section_header" class="fn">write_hash_section_header</a>(&amp;mut self, sh_addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the SysV hash table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_hash" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1432-1443">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_hash" class="fn">reserve_gnu_hash</a>(
&amp;mut self,
bloom_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
bucket_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
symbol_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve a file range for a GNU hash section.</p>
<p><code>symbol_count</code> is the number of symbols in the hash,
not the total number of symbols.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_hash" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1451-1524">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_hash" class="fn">write_gnu_hash</a>&lt;F&gt;(
&amp;mut self,
symbol_base: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
bloom_shift: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
bloom_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
bucket_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
symbol_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
hash: F,
)<div class="where">where
F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,</div></h4></section></summary><div class="docblock"><p>Write a GNU hash section.</p>
<p><code>symbol_count</code> is the number of symbols in the hash.
The argument to <code>hash</code> will be in the range <code>0..symbol_count</code>.</p>
<p>This requires that symbols are already sorted by bucket.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_hash_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1527-1529">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_hash_section_index" class="fn">reserve_gnu_hash_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the GNU hash table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_hash_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1532-1536">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_hash_section_index_with_name" class="fn">reserve_gnu_hash_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the GNU hash table.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_hash_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1541-1557">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_hash_section_header" class="fn">write_gnu_hash_section_header</a>(&amp;mut self, sh_addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the GNU hash table.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_versym" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1562-1569">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_versym" class="fn">reserve_gnu_versym</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve the range for the <code>.gnu.version</code> section.</p>
<p>This function does nothing if no dynamic symbols were reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_null_gnu_versym" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1575-1582">Source</a><h4 class="code-header">pub fn <a href="#method.write_null_gnu_versym" class="fn">write_null_gnu_versym</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the null symbol version entry.</p>
<p>This must be the first symbol version that is written.
This function does nothing if no dynamic symbols were reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_versym" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1585-1587">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_versym" class="fn">write_gnu_versym</a>(&amp;mut self, versym: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Write a symbol version entry.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_versym_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1590-1592">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_versym_section_index" class="fn">reserve_gnu_versym_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the <code>.gnu.version</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_versym_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1595-1599">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_versym_section_index_with_name" class="fn">reserve_gnu_versym_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the <code>.gnu.version</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_versym_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1604-1620">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_versym_section_header" class="fn">write_gnu_versym_section_header</a>(&amp;mut self, sh_addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the <code>.gnu.version</code> section.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_verdef" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1623-1633">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_verdef" class="fn">reserve_gnu_verdef</a>(
&amp;mut self,
verdef_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
verdaux_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve the range for the <code>.gnu.version_d</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_align_gnu_verdef" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1636-1642">Source</a><h4 class="code-header">pub fn <a href="#method.write_align_gnu_verdef" class="fn">write_align_gnu_verdef</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write alignment padding bytes prior to a <code>.gnu.version_d</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_verdef" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1645-1669">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_verdef" class="fn">write_gnu_verdef</a>(&amp;mut self, verdef: &amp;<a class="struct" href="struct.Verdef.html" title="struct object::write::elf::Verdef">Verdef</a>)</h4></section></summary><div class="docblock"><p>Write a version definition entry.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_verdef_shared" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1675-1694">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_verdef_shared" class="fn">write_gnu_verdef_shared</a>(&amp;mut self, verdef: &amp;<a class="struct" href="struct.Verdef.html" title="struct object::write::elf::Verdef">Verdef</a>)</h4></section></summary><div class="docblock"><p>Write a version definition entry that shares the names of the next definition.</p>
<p>This is typically useful when there are only two versions (including the base)
and they have the same name.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_verdaux" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1697-1709">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_verdaux" class="fn">write_gnu_verdaux</a>(&amp;mut self, name: <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a>)</h4></section></summary><div class="docblock"><p>Write a version definition auxiliary entry.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_verdef_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1712-1714">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_verdef_section_index" class="fn">reserve_gnu_verdef_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the <code>.gnu.version_d</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_verdef_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1717-1721">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_verdef_section_index_with_name" class="fn">reserve_gnu_verdef_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the <code>.gnu.version_d</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_verdef_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1726-1742">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_verdef_section_header" class="fn">write_gnu_verdef_section_header</a>(&amp;mut self, sh_addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the <code>.gnu.version_d</code> section.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_verneed" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1745-1755">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_verneed" class="fn">reserve_gnu_verneed</a>(
&amp;mut self,
verneed_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
vernaux_count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve the range for the <code>.gnu.version_r</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_align_gnu_verneed" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1758-1764">Source</a><h4 class="code-header">pub fn <a href="#method.write_align_gnu_verneed" class="fn">write_align_gnu_verneed</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write alignment padding bytes prior to a <code>.gnu.version_r</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_verneed" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1767-1791">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_verneed" class="fn">write_gnu_verneed</a>(&amp;mut self, verneed: &amp;<a class="struct" href="struct.Verneed.html" title="struct object::write::elf::Verneed">Verneed</a>)</h4></section></summary><div class="docblock"><p>Write a version need entry.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_vernaux" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1794-1809">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_vernaux" class="fn">write_gnu_vernaux</a>(&amp;mut self, vernaux: &amp;<a class="struct" href="struct.Vernaux.html" title="struct object::write::elf::Vernaux">Vernaux</a>)</h4></section></summary><div class="docblock"><p>Write a version need auxiliary entry.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_verneed_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1812-1814">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_verneed_section_index" class="fn">reserve_gnu_verneed_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the <code>.gnu.version_r</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_verneed_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1817-1821">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_verneed_section_index_with_name" class="fn">reserve_gnu_verneed_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the <code>.gnu.version_r</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_verneed_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1826-1842">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_verneed_section_header" class="fn">write_gnu_verneed_section_header</a>(&amp;mut self, sh_addr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>)</h4></section></summary><div class="docblock"><p>Write the section header for the <code>.gnu.version_r</code> section.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_attributes_section_index" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1845-1847">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_attributes_section_index" class="fn">reserve_gnu_attributes_section_index</a>(&amp;mut self) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the <code>.gnu.attributes</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_attributes_section_index_with_name" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1850-1857">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_attributes_section_index_with_name" class="fn">reserve_gnu_attributes_section_index_with_name</a>(
&amp;mut self,
name: &amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],
) -&gt; <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a></h4></section></summary><div class="docblock"><p>Reserve the section index for the <code>.gnu.attributes</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_gnu_attributes" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1860-1868">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_gnu_attributes" class="fn">reserve_gnu_attributes</a>(&amp;mut self, gnu_attributes_size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve the range for the <code>.gnu.attributes</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_attributes_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1873-1889">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_attributes_section_header" class="fn">write_gnu_attributes_section_header</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write the section header for the <code>.gnu.attributes</code> section.</p>
<p>This function does nothing if the section index was not reserved.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_gnu_attributes" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1892-1899">Source</a><h4 class="code-header">pub fn <a href="#method.write_gnu_attributes" class="fn">write_gnu_attributes</a>(&amp;mut self, data: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>])</h4></section></summary><div class="docblock"><p>Write the data for the <code>.gnu.attributes</code> section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_relocations" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1904-1906">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_relocations" class="fn">reserve_relocations</a>(&amp;mut self, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, is_rela: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve a file range for the given number of relocations.</p>
<p>Returns the offset of the range.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_align_relocation" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1909-1911">Source</a><h4 class="code-header">pub fn <a href="#method.write_align_relocation" class="fn">write_align_relocation</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write alignment padding bytes prior to a relocation section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_relocation" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1914-1947">Source</a><h4 class="code-header">pub fn <a href="#method.write_relocation" class="fn">write_relocation</a>(&amp;mut self, is_rela: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, rel: &amp;<a class="struct" href="struct.Rel.html" title="struct object::write::elf::Rel">Rel</a>)</h4></section></summary><div class="docblock"><p>Write a relocation.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_relocation_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1958-1979">Source</a><h4 class="code-header">pub fn <a href="#method.write_relocation_section_header" class="fn">write_relocation_section_header</a>(
&amp;mut self,
name: <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a>,
section: <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a>,
symtab: <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a>,
offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
is_rela: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
)</h4></section></summary><div class="docblock"><p>Write the section header for a relocation section.</p>
<p><code>section</code> is the index of the section the relocations apply to,
or 0 if none.</p>
<p><code>symtab</code> is the index of the symbol table the relocations refer to,
or 0 if none.</p>
<p><code>offset</code> is the file offset of the relocations.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_relative_relocation_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#1985-2003">Source</a><h4 class="code-header">pub fn <a href="#method.write_relative_relocation_section_header" class="fn">write_relative_relocation_section_header</a>(
&amp;mut self,
name: <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a>,
offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
)</h4></section></summary><div class="docblock"><p>Write the section header for a relative relocation section.</p>
<p><code>offset</code> is the file offset of the relocations.
<code>size</code> is the size of the section in bytes.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.reserve_comdat" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#2010-2012">Source</a><h4 class="code-header">pub fn <a href="#method.reserve_comdat" class="fn">reserve_comdat</a>(&amp;mut self, count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Reserve a file range for a COMDAT section.</p>
<p><code>count</code> is the number of sections in the COMDAT group.</p>
<p>Returns the offset of the range.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_comdat_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#2015-2018">Source</a><h4 class="code-header">pub fn <a href="#method.write_comdat_header" class="fn">write_comdat_header</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Write <code>GRP_COMDAT</code> at the start of the COMDAT section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_comdat_entry" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#2021-2023">Source</a><h4 class="code-header">pub fn <a href="#method.write_comdat_entry" class="fn">write_comdat_entry</a>(&amp;mut self, entry: <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a>)</h4></section></summary><div class="docblock"><p>Write an entry in a COMDAT section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.write_comdat_section_header" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#2026-2046">Source</a><h4 class="code-header">pub fn <a href="#method.write_comdat_section_header" class="fn">write_comdat_section_header</a>(
&amp;mut self,
name: <a class="struct" href="../struct.StringId.html" title="struct object::write::StringId">StringId</a>,
symtab: <a class="struct" href="struct.SectionIndex.html" title="struct object::write::elf::SectionIndex">SectionIndex</a>,
symbol: <a class="struct" href="struct.SymbolIndex.html" title="struct object::write::elf::SymbolIndex">SymbolIndex</a>,
offset: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
count: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
)</h4></section></summary><div class="docblock"><p>Write the section header for a COMDAT section.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.attributes_writer" class="method"><a class="src rightside" href="../../../src/object/write/elf/writer.rs.html#2049-2051">Source</a><h4 class="code-header">pub fn <a href="#method.attributes_writer" class="fn">attributes_writer</a>(&amp;self) -&gt; <a class="struct" href="struct.AttributesWriter.html" title="struct object::write::elf::AttributesWriter">AttributesWriter</a></h4></section></summary><div class="docblock"><p>Return a helper for writing an attributes section.</p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Writer%3C'a%3E" class="impl"><a href="#impl-Freeze-for-Writer%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Writer.html" title="struct object::write::elf::Writer">Writer</a>&lt;'a&gt;</h3></section><section id="impl-RefUnwindSafe-for-Writer%3C'a%3E" class="impl"><a href="#impl-RefUnwindSafe-for-Writer%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Writer.html" title="struct object::write::elf::Writer">Writer</a>&lt;'a&gt;</h3></section><section id="impl-Send-for-Writer%3C'a%3E" class="impl"><a href="#impl-Send-for-Writer%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Writer.html" title="struct object::write::elf::Writer">Writer</a>&lt;'a&gt;</h3></section><section id="impl-Sync-for-Writer%3C'a%3E" class="impl"><a href="#impl-Sync-for-Writer%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Writer.html" title="struct object::write::elf::Writer">Writer</a>&lt;'a&gt;</h3></section><section id="impl-Unpin-for-Writer%3C'a%3E" class="impl"><a href="#impl-Unpin-for-Writer%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Writer.html" title="struct object::write::elf::Writer">Writer</a>&lt;'a&gt;</h3></section><section id="impl-UnsafeUnpin-for-Writer%3C'a%3E" class="impl"><a href="#impl-UnsafeUnpin-for-Writer%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.UnsafeUnpin.html" title="trait core::marker::UnsafeUnpin">UnsafeUnpin</a> for <a class="struct" href="struct.Writer.html" title="struct object::write::elf::Writer">Writer</a>&lt;'a&gt;</h3></section><section id="impl-UnwindSafe-for-Writer%3C'a%3E" class="impl"><a href="#impl-UnwindSafe-for-Writer%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Writer.html" title="struct object::write::elf::Writer">Writer</a>&lt;'a&gt;</h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#141">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#142">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>