node/lib/metasm/metasm/main.rb
# resolve relocations:
# calculate each reloc target using Expression#bind(binding)
# if numeric, replace the raw data with the encoding of this value (+fill+s preceding data if needed) and remove the reloc
# if replace_target is true, the reloc target is replaced with its bound counterpart
resolve relocations:
calculate each reloc target using Expression#bind(binding)
if numeric, replace the raw data with the encoding of this value (+fill+s preceding data if needed) and remove the reloc
if replace_target is true, the reloc target is replaced with its bound counterpart
resolve relocations : calculate each reloc target using Expression#bind ( binding ) if numeric replace the raw data with the encoding of this value ( + fill + s preceding data if needed ) and remove the reloc if replace_target is true the reloc target is replaced with its bound counterpart
def fixup_choice(binding, replace_target)
		return if binding.empty?
		@reloc.keys.each { |off|
			val = @reloc[off].target.bind(binding).reduce
			if val.kind_of? Integer
				reloc = @reloc[off]
				reloc.fixup(self, off, val)
				@reloc.delete(off)	
			elsif replace_target
				@reloc[off].target = val
			end
		}
	end
def fixup_choice ( binding , replace_target ) return if binding . empty? @reloc . keys . each { | off | val = @reloc [ off ] . target . bind ( binding ) . reduce if val . kind_of? Integer reloc = @reloc [ off ] reloc . fixup ( self , off , val ) @reloc . delete ( off ) elsif replace_target @reloc [ off ] . target = val end } end
resolve relocations:
calculate each reloc target using Expression#bind(binding)
if numeric, replace the raw data with the encoding of this value (+fill+s preceding data if needed) and remove the reloc
if replace_target is true, the reloc target is replaced with its bound counterpart
resolve relocations : calculate each reloc target using Expression#bind ( binding ) if numeric replace the raw data with the encoding of this value ( + fill + s preceding data if needed ) and remove the reloc if replace_target is true the reloc target is replaced with its bound counterpart
# delete only if not overflowed
binding
replace_target