let the BootClasses carry functions, ie one level squeezed between object_space and funtion, the class is coming to life

This commit is contained in:
Torsten Ruger
2014-05-31 14:35:33 +03:00
parent 3713d08748
commit a6f02d6be3
10 changed files with 99 additions and 65 deletions

View File

@ -22,7 +22,9 @@ module Elf
binary = program.assemble(StringIO.new )
blocks = []
program.functions.each {|f| blocks += f.blocks }
program.classes.values.each do |clazz|
clazz.functions.each {|f| blocks += f.blocks }
end
blocks += [program.entry , program.exit , program.main]
blocks.flatten.each do |b|
add_symbol b.name.to_s , b.position