Class: Rubycc::ObjFile::ELFReader::Symbol

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

Overview

A parsed symbol table entry. bind/type/visibility are the decoded symbolic forms; shndx is the raw st_shndx and section the Section it names (nil for an undefined/absolute/common symbol). The predicates distinguish the reserved st_shndx markers the writer emits.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bindObject

Returns the value of attribute bind

Returns:

  • (Object)

    the current value of bind



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def bind
  @bind
end

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def index
  @index
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def name
  @name
end

#sectionObject

Returns the value of attribute section

Returns:

  • (Object)

    the current value of section



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def section
  @section
end

#shndxObject

Returns the value of attribute shndx

Returns:

  • (Object)

    the current value of shndx



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def shndx
  @shndx
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def size
  @size
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def value
  @value
end

#visibilityObject

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



181
182
183
# File 'lib/rubycc/objfile/elf_reader.rb', line 181

def visibility
  @visibility
end

Instance Method Details

#absolute?Boolean

Returns:

  • (Boolean)


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

def absolute? = shndx == SHN_ABS

#common?Boolean

Returns:

  • (Boolean)


187
188
189
190
# File 'lib/rubycc/objfile/elf_reader.rb', line 187

def common? = shndx == SHN_COMMON
# Defined here means backed by a real section in this object (neither
# imported nor a reserved marker) — what "does this .so export printf?"
# asks of a dynamic symbol.

#defined?Boolean

Defined here means backed by a real section in this object (neither imported nor a reserved marker) — what "does this .so export printf?" asks of a dynamic symbol.

Returns:

  • (Boolean)


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

def defined? = !undefined? && shndx < SHN_LORESERVE

#undefined?Boolean

Returns:

  • (Boolean)


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

def undefined? = shndx == SHN_UNDEF