node/lib/metasm/metasm/exe_format/coff_decode.rb
def decode_reloc_i386(r)
		case r.type
		when 'ABSOLUTE'
		when 'HIGHLOW'
			addr = decode_word
			if s = sect_at_va(addr)
				label = label_at(s.encoded, s.encoded.ptr, "xref_#{Expression[addr]}")
				Metasm::Relocation.new(Expression[label], :u32, @endianness)
			end
		when 'DIR64'
			addr = decode_xword
			if s = sect_at_va(addr)
				label = label_at(s.encoded, s.encoded.ptr, "xref_#{Expression[addr]}")
				Metasm::Relocation.new(Expression[label], :u64, @endianness)
			end
		else puts "W: COFF: Unsupported i386 relocation #{r.inspect}" if $VERBOSE
		end
	end
# decodes an I386 COFF relocation pointing to encoded.ptr
decodes an I386 COFF relocation pointing to encoded.ptr
decodes an I386 COFF relocation pointing to encoded . ptr
def decode_reloc_i386(r)
		case r.type
		when 'ABSOLUTE'
		when 'HIGHLOW'
			addr = decode_word
			if s = sect_at_va(addr)
				label = label_at(s.encoded, s.encoded.ptr, "xref_#{Expression[addr]}")
				Metasm::Relocation.new(Expression[label], :u32, @endianness)
			end
		when 'DIR64'
			addr = decode_xword
			if s = sect_at_va(addr)
				label = label_at(s.encoded, s.encoded.ptr, "xref_#{Expression[addr]}")
				Metasm::Relocation.new(Expression[label], :u64, @endianness)
			end
		else puts "W: COFF: Unsupported i386 relocation #{r.inspect}" if $VERBOSE
		end
	end
def decode_reloc_i386 ( r ) case r . type when 'ABSOLUTE' when 'HIGHLOW' addr = decode_word if s = sect_at_va ( addr ) label = label_at ( s . encoded , s . encoded . ptr , "xref_#{Expression[addr]}" ) Metasm :: Relocation . new ( Expression [ label ] , :u32 , @endianness ) end when 'DIR64' addr = decode_xword if s = sect_at_va ( addr ) label = label_at ( s . encoded , s . encoded . ptr , "xref_#{Expression[addr]}" ) Metasm :: Relocation . new ( Expression [ label ] , :u64 , @endianness ) end else puts "W: COFF: Unsupported i386 relocation #{r.inspect}" if $VERBOSE end end
decodes an I386 COFF relocation pointing to encoded.ptr
decodes an I386 COFF relocation pointing to encoded . ptr
r