Class: Rubycc::ObjFile::ELFReader::Section

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubycc/objfile/elf_reader.rb

Overview

A parsed section header plus (for non-NOBITS sections) its raw file bytes. index is the section's position in the header table — the value other sections' sh_link/sh_info and symbols' st_shndx refer to. data is nil for SHT_NULL and SHT_NOBITS (.bss), which occupy no file bytes while still reporting their in-memory size.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addrObject

Returns the value of attribute addr

Returns:

  • (Object)

    the current value of addr



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def addr
  @addr
end

#addralignObject

Returns the value of attribute addralign

Returns:

  • (Object)

    the current value of addralign



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def addralign
  @addralign
end

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def data
  @data
end

#entsizeObject

Returns the value of attribute entsize

Returns:

  • (Object)

    the current value of entsize



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def entsize
  @entsize
end

#flagsObject

Returns the value of attribute flags

Returns:

  • (Object)

    the current value of flags



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def flags
  @flags
end

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def index
  @index
end

#infoObject

Returns the value of attribute info

Returns:

  • (Object)

    the current value of info



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def info
  @info
end

Returns the value of attribute link

Returns:

  • (Object)

    the current value of link



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def link
  @link
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def name
  @name
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def offset
  @offset
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def size
  @size
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



170
171
172
# File 'lib/rubycc/objfile/elf_reader.rb', line 170

def type
  @type
end

Instance Method Details

#nobits?Boolean

Returns:

  • (Boolean)


174
# File 'lib/rubycc/objfile/elf_reader.rb', line 174

def nobits? = type == SHT_NOBITS