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

9 lines
11 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="Interface for writing object files."><title>object::write - 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 mod"><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="#">Module write</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="#">Module write</a></h2><h3><a href="#reexports">Module Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate object</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></div><h1>Module <span>write</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/mod.rs.html#1-1140">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Interface for writing object files.</p>
<p>This module provides a unified write API for relocatable object files
using <a href="struct.Object.html" title="struct object::write::Object"><code>Object</code></a>. This does not support writing executable files.
This supports the following file formats: COFF, ELF, Mach-O, and XCOFF.</p>
<p>The submodules define helpers for writing the raw structs. These support
writing both relocatable and executable files. There are writers for
the following file formats: <a href="coff/struct.Writer.html" title="struct object::write::coff::Writer">COFF</a>, <a href="elf/struct.Writer.html" title="struct object::write::elf::Writer">ELF</a>,
and <a href="pe/struct.Writer.html" title="struct object::write::pe::Writer">PE</a>.</p>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><dl class="item-table reexports"><dt id="reexport.CoffExportStyle"><code>pub use coff::<a class="enum" href="coff/enum.CoffExportStyle.html" title="enum object::write::coff::CoffExportStyle">CoffExportStyle</a>;</code></dt></dl><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="coff/index.html" title="mod object::write::coff">coff</a></dt><dd>Support for writing COFF files.</dd><dt><a class="mod" href="elf/index.html" title="mod object::write::elf">elf</a></dt><dd>Support for writing ELF files.</dd><dt><a class="mod" href="pe/index.html" title="mod object::write::pe">pe</a></dt><dd>Helper for writing PE files.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Comdat.html" title="struct object::write::Comdat">Comdat</a></dt><dd>A COMDAT section group.</dd><dt><a class="struct" href="struct.ComdatId.html" title="struct object::write::ComdatId">Comdat<wbr>Id</a></dt><dd>An identifier used to reference a COMDAT section group.</dd><dt><a class="struct" href="struct.Error.html" title="struct object::write::Error">Error</a></dt><dd>The error type used within the write module.</dd><dt><a class="struct" href="struct.MachOBuildVersion.html" title="struct object::write::MachOBuildVersion">MachO<wbr>Build<wbr>Version</a></dt><dd>The customizable portion of a <a href="../macho/struct.BuildVersionCommand.html" title="struct object::macho::BuildVersionCommand"><code>macho::BuildVersionCommand</code></a>.</dd><dt><a class="struct" href="struct.Object.html" title="struct object::write::Object">Object</a></dt><dd>A writable relocatable object file.</dd><dt><a class="struct" href="struct.Relocation.html" title="struct object::write::Relocation">Relocation</a></dt><dd>A relocation in an object file.</dd><dt><a class="struct" href="struct.Section.html" title="struct object::write::Section">Section</a></dt><dd>A section in an object file.</dd><dt><a class="struct" href="struct.SectionId.html" title="struct object::write::SectionId">Section<wbr>Id</a></dt><dd>An identifier used to reference a section.</dd><dt><a class="struct" href="struct.StreamingBuffer.html" title="struct object::write::StreamingBuffer">Streaming<wbr>Buffer</a></dt><dd>A <a href="trait.WritableBuffer.html" title="trait object::write::WritableBuffer"><code>WritableBuffer</code></a> that streams data to a <a href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write"><code>Write</code></a> implementation.</dd><dt><a class="struct" href="struct.StringId.html" title="struct object::write::StringId">String<wbr>Id</a></dt><dd>An identifier for an entry in a string table.</dd><dt><a class="struct" href="struct.Symbol.html" title="struct object::write::Symbol">Symbol</a></dt><dd>A symbol in an object file.</dd><dt><a class="struct" href="struct.SymbolId.html" title="struct object::write::SymbolId">Symbol<wbr>Id</a></dt><dd>An identifier used to reference a symbol.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.AddressSize.html" title="enum object::write::AddressSize">Address<wbr>Size</a></dt><dd>The size of an address value for an architecture.</dd><dt><a class="enum" href="enum.Architecture.html" title="enum object::write::Architecture">Architecture</a></dt><dd>A CPU architecture.</dd><dt><a class="enum" href="enum.BinaryFormat.html" title="enum object::write::BinaryFormat">Binary<wbr>Format</a></dt><dd>A binary file format.</dd><dt><a class="enum" href="enum.ComdatKind.html" title="enum object::write::ComdatKind">Comdat<wbr>Kind</a></dt><dd>The selection kind for a COMDAT section group.</dd><dt><a class="enum" href="enum.FileFlags.html" title="enum object::write::FileFlags">File<wbr>Flags</a></dt><dd>File flags that are specific to each file format.</dd><dt><a class="enum" href="enum.Mangling.html" title="enum object::write::Mangling">Mangling</a></dt><dd>The symbol name mangling scheme.</dd><dt><a class="enum" href="enum.RelocationEncoding.html" title="enum object::write::RelocationEncoding">Relocation<wbr>Encoding</a></dt><dd>Information about how the result of the relocation operation is encoded in the place.</dd><dt><a class="enum" href="enum.RelocationFlags.html" title="enum object::write::RelocationFlags">Relocation<wbr>Flags</a></dt><dd>Relocation fields that are specific to each file format and architecture.</dd><dt><a class="enum" href="enum.RelocationKind.html" title="enum object::write::RelocationKind">Relocation<wbr>Kind</a></dt><dd>The operation used to calculate the result of the relocation.</dd><dt><a class="enum" href="enum.SectionFlags.html" title="enum object::write::SectionFlags">Section<wbr>Flags</a></dt><dd>Section flags that are specific to each file format.</dd><dt><a class="enum" href="enum.SectionKind.html" title="enum object::write::SectionKind">Section<wbr>Kind</a></dt><dd>The kind of a section.</dd><dt><a class="enum" href="enum.SegmentFlags.html" title="enum object::write::SegmentFlags">Segment<wbr>Flags</a></dt><dd>Segment flags that are specific to each file format.</dd><dt><a class="enum" href="enum.StandardSection.html" title="enum object::write::StandardSection">Standard<wbr>Section</a></dt><dd>A standard section kind.</dd><dt><a class="enum" href="enum.StandardSegment.html" title="enum object::write::StandardSegment">Standard<wbr>Segment</a></dt><dd>A standard segment kind.</dd><dt><a class="enum" href="enum.SubArchitecture.html" title="enum object::write::SubArchitecture">SubArchitecture</a></dt><dd>A CPU sub-architecture.</dd><dt><a class="enum" href="enum.SymbolFlags.html" title="enum object::write::SymbolFlags">Symbol<wbr>Flags</a></dt><dd>Symbol flags that are specific to each file format.</dd><dt><a class="enum" href="enum.SymbolKind.html" title="enum object::write::SymbolKind">Symbol<wbr>Kind</a></dt><dd>The kind of a symbol.</dd><dt><a class="enum" href="enum.SymbolScope.html" title="enum object::write::SymbolScope">Symbol<wbr>Scope</a></dt><dd>A symbol scope.</dd><dt><a class="enum" href="enum.SymbolSection.html" title="enum object::write::SymbolSection">Symbol<wbr>Section</a></dt><dd>The section where a symbol is defined.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.WritableBuffer.html" title="trait object::write::WritableBuffer">Writable<wbr>Buffer</a></dt><dd>Trait for writable buffer.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.Result.html" title="type object::write::Result">Result</a></dt><dd>The result type used within the write module.</dd></dl></section></div></main></body></html>