class RiSC16::Object

Overview

Represent a relocatable object. It can be linked into other objects or into a binary. See RiSC16::Assembler::Linker.

Defined in:

assembler/object.cr

Constant Summary

ENDIAN = IO::ByteFormat::BigEndian

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(name : Nil | String = nil) #

[View source]

Class Method Detail

def self.from_io(io, name = nil, endian = ENDIAN) #

Build an object from given io.


[View source]

Instance Method Detail

def has_start? #

return true is this object define a start symbol in a section. This is useful to check if this is supposed to be executable.


[View source]
def merged : Bool #

Indicate if the object is ready for linking or not. An object file incated as merged should: have all the sections it contains have a fixed, relative to 0, absolute address.


[View source]
def merged=(merged : Bool) #

Indicate if the object is ready for linking or not. An object file incated as merged should: have all the sections it contains have a fixed, relative to 0, absolute address.


[View source]
def name : String | Nil #

Optional name used to indicate the origin source of an object file, for helping humans.


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

Optional name used to indicate the origin source of an object file, for helping humans.


[View source]
def sections : Array(Section) #

The array of sections, that is, continuous piece of data, declaring and referencing symbols.


[View source]
def sections=(sections : Array(Section)) #

The array of sections, that is, continuous piece of data, declaring and referencing symbols.


[View source]
def to_io(io, endian = ENDIAN) #

Serialize this object to the given io.


[View source]