Class: Elf::Writer::OutputSection

Inherits:
Object
  • Object
show all
Defined in:
lib/mithril/writer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type, flags, vaddr, siz, link, info, align, entsize, data) ⇒ OutputSection

TODO: Use params array



54
55
56
57
58
# File 'lib/mithril/writer.rb', line 54

def initialize(name,type,flags,vaddr,siz,link,info,align,entsize,data) #link and info are strings, offset is done by output stage
  @name,@type,@flags, @vaddr, @siz, @link, @info, @align, @entsize, @data= name,type,flags,vaddr,siz,link,info,align,entsize, data
  @off = nil
  @index = nil
end

Instance Attribute Details

#alignObject

Returns the value of attribute align.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def align
  @align
end

#dataObject

Returns the value of attribute data.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def data
  @data
end

#entsizeObject

Returns the value of attribute entsize.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def entsize
  @entsize
end

#flagsObject

Returns the value of attribute flags.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def flags
  @flags
end

#indexObject

Returns the value of attribute index.



52
53
54
# File 'lib/mithril/writer.rb', line 52

def index
  @index
end

#infoObject

Returns the value of attribute info.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def info
  @info
end

Returns the value of attribute link.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def link
  @link
end

#nameObject

Returns the value of attribute name.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def name
  @name
end

#offObject

Returns the value of attribute off.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def off
  @off
end

#shdrObject

Returns the value of attribute shdr.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def shdr
  @shdr
end

#sizObject

Returns the value of attribute siz.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def siz
  @siz
end

#typeObject

Returns the value of attribute type.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def type
  @type
end

#vaddrObject

Returns the value of attribute vaddr.



51
52
53
# File 'lib/mithril/writer.rb', line 51

def vaddr
  @vaddr
end

Instance Method Details

#endObject



59
60
61
# File 'lib/mithril/writer.rb', line 59

def end
  @vaddr + @siz
end