node/lib/metasm/metasm/exe_format/elf_decode.rb
def decode_sections
		@symbols.clear	# the NULL symbol is explicit in the symbol table
		decode_sections_symbols
		decode_sections_relocs
		@sections.each { |s|
			case s.type
			when 'PROGBITS', 'NOBITS'
			when 'TODO'	# TODO
			end
		}
		@sections.find_all { |s| s.type == 'PROGBITS' or s.type == 'NOBITS' }.each { |s|
			if s.flags.include? 'ALLOC'
				if s.type == 'NOBITS'
					s.encoded = EncodedData.new '', :virtsize => s.size
				else
					s.encoded = @encoded[s.offset, s.size] || EncodedData.new
					s.encoded.virtsize = s.size
				end
			end
		}
	end
# decodes sections, interprets symbols/relocs, fills sections.encoded
decodes sections, interprets symbols/relocs, fills sections.encoded
decodes sections interprets symbols / relocs fills sections . encoded
def decode_sections
		@symbols.clear	
		decode_sections_symbols
		decode_sections_relocs
		@sections.each { |s|
			case s.type
			when 'PROGBITS', 'NOBITS'
			when 'TODO'	
			end
		}
		@sections.find_all { |s| s.type == 'PROGBITS' or s.type == 'NOBITS' }.each { |s|
			if s.flags.include? 'ALLOC'
				if s.type == 'NOBITS'
					s.encoded = EncodedData.new '', :virtsize => s.size
				else
					s.encoded = @encoded[s.offset, s.size] || EncodedData.new
					s.encoded.virtsize = s.size
				end
			end
		}
	end
def decode_sections @symbols . clear decode_sections_symbols decode_sections_relocs @sections . each { | s | case s . type when 'PROGBITS' , 'NOBITS' when 'TODO' end } @sections . find_all { | s | s . type == 'PROGBITS' or s . type == 'NOBITS' } . each { | s | if s . flags . include? 'ALLOC' if s . type == 'NOBITS' s . encoded = EncodedData . new '' , :virtsize => s . size else s . encoded = @encoded [ s . offset , s . size ] || EncodedData . new s . encoded . virtsize = s . size end end } end
decodes sections, interprets symbols/relocs, fills sections.encoded
decodes sections interprets symbols / relocs fills sections . encoded
# the NULL symbol is explicit in the symbol table # TODO