node/lib/metasm/metasm/main.rb
# returns a default binding suitable for use in +fixup+
# every export is expressed as base + offset
# base defaults to the first export name + its offset
returns a default binding suitable for use in +fixup+
every export is expressed as base + offset
base defaults to the first export name + its offset
returns a default binding suitable for use in + fixup + every export is expressed as base + offset base defaults to the first export name + its offset
def binding(base = nil)
		if not base
			key = @export.index(@export.values.min)
			return {} if not key
			base = (@export[key] == 0 ? key : Expression[key, :-, @export[key]])
		end
		binding = {}
		@export.each { |n, o| binding.update n => Expression.new(:+, o, base) }
		binding
	end
def binding ( base = nil ) if not base key = @export . index ( @export . values . min ) return { } if not key base = ( @export [ key ] == 0 ? key : Expression [ key , :- , @export [ key ] ] ) end binding = { } @export . each { | n , o | binding . update n => Expression . new ( :+ , o , base ) } binding end
returns a default binding suitable for use in +fixup+
every export is expressed as base + offset
base defaults to the first export name + its offset
returns a default binding suitable for use in + fixup + every export is expressed as base + offset base defaults to the first export name + its offset
base