derive binary code form word

long ago hacked the binary code to use integers (thus forsaking correct
arm binaries)
Finally fix by deriving from Word which now has correct binary access
Dumped binary.name in the process, that is available from the method
This commit is contained in:
Torsten Ruger
2015-11-14 15:04:04 +02:00
parent 8fa92515b5
commit 278eccbed5
8 changed files with 33 additions and 35 deletions

View File

@ -30,14 +30,17 @@ module Elf
end
Register.machine.objects.each do |id,slot|
next if slot.is_a?(Parfait::BinaryCode)
if( slot.respond_to? :sof_reference_name )
label = "#{slot.sof_reference_name}"
else
label = "#{slot.class.name}::#{slot.position.to_s(16)}"
end
label += "=#{slot}" if slot.is_a?(Symbol) or slot.is_a?(String)
label += "=#{slot.name}" if slot.is_a?(Parfait::BinaryCode)
add_symbol label , slot.position
if slot.is_a?(Parfait::Method)
add_symbol slot.name.to_s , slot.binary.position
end
end
end
attr_reader :text