node/lib/metasm/metasm/exe_format/elf_decode.rb
# returns a metasm CPU object corresponding to +header.machine+
returns a metasm CPU object corresponding to +header.machine+
returns a metasm CPU object corresponding to + header . machine +
def cpu_from_headers
		case @header.machine
		when 'X86_64'; X86_64.new
		when '386'; Ia32.new
		when 'MIPS'; (@header.flags.include?('32BITMODE') ? MIPS64 : MIPS).new @endianness
		when 'PPC'; PPC.new
		when 'ARM'; ARM.new
		when 'SH'; Sh4.new
		else raise "unsupported cpu #{@header.machine}"
		end
	end
def cpu_from_headers case @header . machine when 'X86_64' ; X86_64 . new when '386' ; Ia32 . new when 'MIPS' ; ( @header . flags . include? ( '32BITMODE' ) ? MIPS64 : MIPS ) . new @endianness when 'PPC' ; PPC . new when 'ARM' ; ARM . new when 'SH' ; Sh4 . new else raise "unsupported cpu #{@header.machine}" end end
returns a metasm CPU object corresponding to +header.machine+
returns a metasm CPU object corresponding to + header . machine +