pub enum Section {
Show 26 variants
NOP,
Code(Code),
RunAtOffset(u16, u16),
SectionSwitch(SectionSwitch),
BSS(u32),
Patch(Patch),
XDEF(XDEF),
XREF(XREF),
LNKHeader(LNKHeader),
LocalSymbol(LocalSymbol),
GroupSymbol(GroupSymbol),
Filename(Filename),
SetMXInfo(SetMXInfo),
CPU(u8),
XBSS(XBSS),
IncSLDLineNum(u16),
IncSLDLineNumByte(u16, u8),
SetSLDLineNum(SetSLDLineNum),
SetSLDLineNumFile(SetSLDLineNumFile),
EndSLDInfo(u16),
FunctionStart(FunctionStart),
FunctionEnd(FunctionEnd),
BlockStart(BlockStart),
BlockEnd(BlockEnd),
Def(Def),
Def2(Def2),
}Expand description
A section within an OBJ file.
Sections can contain code, data, relocations, symbols, or debug information. The section list is terminated by a NOP entry.
§Section Types
- Code: Executable machine code
- BSS: Uninitialized data
- XDEF/XREF: Symbol exports and imports
- Patch: Relocation information
- Debug sections: Line numbers, function info, etc.
Variants§
NOP
End of file marker (tag 0).
Code(Code)
Machine code (tag 2).
RunAtOffset(u16, u16)
Run at offset (tag 4)
SectionSwitch(SectionSwitch)
Switch to different section (tag 6).
BSS(u32)
Uninitialized data (BSS) with size in bytes (tag 8).
Patch(Patch)
Relocation patch (tag 10).
XDEF(XDEF)
External symbol definition (tag 12).
XREF(XREF)
External symbol reference (tag 14).
LNKHeader(LNKHeader)
Section header (tag 16).
LocalSymbol(LocalSymbol)
Local symbol (tag 18).
GroupSymbol(GroupSymbol)
Group symbol (tag 20).
Filename(Filename)
File name reference (tag 28).
SetMXInfo(SetMXInfo)
Set MX info (tag 44).
CPU(u8)
CPU type specification (tag 46).
XBSS(XBSS)
External BSS symbol (tag 48).
IncSLDLineNum(u16)
Increment line number (tag 50).
IncSLDLineNumByte(u16, u8)
Increment line number by byte amount (tag 52).
SetSLDLineNum(SetSLDLineNum)
Set line number (tag 56).
SetSLDLineNumFile(SetSLDLineNumFile)
Set line number with file (tag 58).
EndSLDInfo(u16)
End of SLD info (tag 60).
FunctionStart(FunctionStart)
Function start marker (tag 74).
FunctionEnd(FunctionEnd)
Function end marker (tag 76).
BlockStart(BlockStart)
Block start marker (tag 78).
BlockEnd(BlockEnd)
Block end marker (tag 80).
Def(Def)
Variable/type definition (tag 82).
Def2(Def2)
Extended definition with tag (tag 84).
Trait Implementations§
Source§impl BinRead for Section
impl BinRead for Section
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for Section
impl BinWrite for Section
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
Source§fn write<W>(&self, writer: &mut W) -> Result<(), Error>
fn write<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer using default arguments. Read moreSource§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming native-endian byte order. Read moreSource§fn write_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Self to the writer using the given arguments. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Self to the writer, assuming big-endian byte order, using the
given arguments. Read more