Class: Rubycc::Backend::AArch64::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/rubycc/backend/aarch64.rb

Overview

Result of compiling one function, the same shape the x86_64 backend returns: bytes the machine code, symbols an array of { name:, offset:, size: }, and relocations an array of kind-tagged records. The kinds emitted are :call (a bl site the linker fills in with an R_AARCH64_CALL26) and the four address-forming kinds :string, :global, :func and :got. Each of the latter records a single offset — that of the leading adrp — even though it needs two ELF relocations; splitting one record into the pair is the object writer's job, since how many relocations an address costs is a property of the machine.

Instance Attribute Summary collapse

Instance Attribute Details

#bytesObject (readonly)

Returns the value of attribute bytes

Returns:

  • (Object)

    the current value of bytes



142
143
144
# File 'lib/rubycc/backend/aarch64.rb', line 142

def bytes
  @bytes
end

#relocationsObject (readonly)

Returns the value of attribute relocations

Returns:

  • (Object)

    the current value of relocations



142
143
144
# File 'lib/rubycc/backend/aarch64.rb', line 142

def relocations
  @relocations
end

#symbolsObject (readonly)

Returns the value of attribute symbols

Returns:

  • (Object)

    the current value of symbols



142
143
144
# File 'lib/rubycc/backend/aarch64.rb', line 142

def symbols
  @symbols
end