Module relocations

Module relocations 

Source
Expand description

This module defines the Relocation trait and several utilities for implementing relocations.

Structs§

ImpossibleRelocation
Error returned when encoding a relocation failed
RelocationType
RelocationType contains all information needed to describe how a relocation should be performed by the runtime
SimpleRelocation
A simple relocation type for relocations that do not need complex bitpacking.

Enums§

RelocationEncoding
Enum that specifies how a certain relocation is encoded.
RelocationKind
Enum that specifies if/how relocations should be adapted if the assembling buffer is moved
RelocationSize
A simple size-based relocation descriptor for relocations in data directives. Can be converted to a relocation for any kind of architecture using Relocation::from_size.

Traits§

ArchitectureRelocationEncoding
Trait that just handles the internal decoding of architecture-specific relocation encodings This is useful so the relocation type machinery can be generic over it.
Relocation
Used to inform assemblers on how to implement relocations for each architecture. When implementing a new architecture, one simply has to implement this trait for the architecture’s relocation definition.