class RiSC16::Object::Section

Overview

A section is a continuous block of code with it's symbols definitions and references.

The block of code is not usable as is, it require to be linked to solve the references. All the address are relative to the start of the block of code It has an optional offset within a namespace where it expect to be loaded. When ready for merging, a section should have an absolute, expected loading address (relative to address 0). This allows the linker to quickly adjust the symbols addresses given the real loading address.

Defined in:

assembler/object.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, offset : Int32 | Nil = nil, options : RiSC16::Object::Section::Options = Options::None) #

[View source]

Instance Method Detail

def absolute : Int32 | Nil #

[View source]
def absolute=(absolute : Int32 | Nil) #

[View source]
def definitions : Hash(String, Symbol) #

[View source]
def definitions=(definitions : Hash(String, Symbol)) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def offset : Int32 | Nil #

[View source]
def offset=(offset : Int32 | Nil) #

[View source]
def options : Options #

[View source]
def options=(options : Options) #

[View source]
def references : Hash(String, Array(Reference)) #

[View source]
def references=(references : Hash(String, Array(Reference))) #

[View source]
def text : Slice(UInt16) #

[View source]
def text=(text : Slice(UInt16)) #

[View source]