Class: OdinFlex::MachO::Section

Inherits:
Struct
  • Object
show all
Includes:
SectionTypes
Defined in:
lib/odinflex/mach-o.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SectionTypes

#command?, #dysymtab?, #segment?, #symtab?

Instance Attribute Details

#addrObject

Returns the value of attribute addr

Returns:

  • (Object)

    the current value of addr



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def addr
  @addr
end

#alignObject

Returns the value of attribute align

Returns:

  • (Object)

    the current value of align



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def align
  @align
end

#flagsObject

Returns the value of attribute flags

Returns:

  • (Object)

    the current value of flags



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def flags
  @flags
end

#ioObject

Returns the value of attribute io

Returns:

  • (Object)

    the current value of io



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def io
  @io
end

#nrelocObject

Returns the value of attribute nreloc

Returns:

  • (Object)

    the current value of nreloc



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def nreloc
  @nreloc
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def offset
  @offset
end

#reloffObject

Returns the value of attribute reloff

Returns:

  • (Object)

    the current value of reloff



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def reloff
  @reloff
end

#reserved1Object

Returns the value of attribute reserved1

Returns:

  • (Object)

    the current value of reserved1



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def reserved1
  @reserved1
end

#reserved2Object

Returns the value of attribute reserved2

Returns:

  • (Object)

    the current value of reserved2



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def reserved2
  @reserved2
end

#reserved3Object

Returns the value of attribute reserved3

Returns:

  • (Object)

    the current value of reserved3



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def reserved3
  @reserved3
end

#sectnameObject

Returns the value of attribute sectname

Returns:

  • (Object)

    the current value of sectname



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def sectname
  @sectname
end

#segnameObject

Returns the value of attribute segname

Returns:

  • (Object)

    the current value of segname



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def segname
  @segname
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def size
  @size
end

#start_posObject

Returns the value of attribute start_pos

Returns:

  • (Object)

    the current value of start_pos



440
441
442
# File 'lib/odinflex/mach-o.rb', line 440

def start_pos
  @start_pos
end

Instance Method Details

#as_dwarfObject

Raises:

  • (NotImplementedError)


446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/odinflex/mach-o.rb', line 446

def as_dwarf
  raise NotImplementedError, "load WORF" unless defined?(::WORF)

  case sectname
  when "__debug_abbrev"
    WORF::DebugAbbrev.new io, self, start_pos
  when "__debug_info"
    WORF::DebugInfo.new io, self, start_pos
  when "__debug_str"
    WORF::DebugStrings.new io, self, start_pos
  when "__debug_line"
    WORF::DebugLine.new io, self, start_pos
  else
    raise NotImplementedError
  end
end

#section?Boolean

Returns:

  • (Boolean)


444
# File 'lib/odinflex/mach-o.rb', line 444

def section?; true; end