node/lib/metasm/metasm/exe_format/elf_decode.rb
# decodes the elf header, section & program header
decodes the elf header, section & program header
decodes the elf header section & program header
def decode_header(off = 0, decode_phdr=true, decode_shdr=true)
		@encoded.ptr = off
		@header.decode self
		raise InvalidExeFormat, "Invalid elf header size: #{@header.ehsize}" if Header.size(self) != @header.ehsize
		if decode_phdr and @header.phoff != 0
			decode_program_header(@header.phoff+off)
		end
		if decode_shdr and @header.shoff != 0
			decode_section_header(@header.shoff+off)
		end
	end
def decode_header ( off = 0 , decode_phdr = true , decode_shdr = true ) @encoded . ptr = off @header . decode self raise InvalidExeFormat , "Invalid elf header size: #{@header.ehsize}" if Header . size ( self ) != @header . ehsize if decode_phdr and @header . phoff != 0 decode_program_header ( @header . phoff + off ) end if decode_shdr and @header . shoff != 0 decode_section_header ( @header . shoff + off ) end end
decodes the elf header, section & program header
decodes the elf header section & program header
off
decode_phdr
decode_shdr