pub struct RelaxInfo {
pub short_bytes: InstrBytes,
pub short_reloc_offset: usize,
pub short_relocation: Option<Relocation>,
}Expand description
Information for branch relaxation — allows the linker to try a shorter encoding.
When present on an EncodedInstr, the linker starts with this short form
and only promotes to the long form (in bytes) when the target is out of
±127 byte range. This implements Szymanski-style monotonic growth.
Fields§
§short_bytes: InstrBytesComplete short-form instruction bytes (opcode + placeholder rel8).
short_reloc_offset: usizeOffset of the rel8 displacement byte within short_bytes.
short_relocation: Option<Relocation>Optional relocation for the short form. When Some, the linker
applies this relocation to short_bytes instead of raw byte-patching.
Used for architectures like RISC-V where even the short form needs
complex bitfield manipulation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RelaxInfo
impl RefUnwindSafe for RelaxInfo
impl !Send for RelaxInfo
impl !Sync for RelaxInfo
impl Unpin for RelaxInfo
impl UnwindSafe for RelaxInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more