diff --git a/lib/elf/object_writer.rb b/lib/elf/object_writer.rb index b25b3573..cb8b61e6 100644 --- a/lib/elf/object_writer.rb +++ b/lib/elf/object_writer.rb @@ -30,6 +30,10 @@ module Elf end end end + space.main.blocks.each do |b| + add_symbol "main@#{b.name}" , b.position + end + add_symbol "#register@#{space.init.name}" , space.init.position assembler.objects.values.each do |slot| label = "#{slot.class.name}::#{slot.position.to_s(16)}" label += "=#{slot}" if slot.is_a?(Symbol) or slot.is_a?(String)