lib/metasm/metasm/exe_format/elf_decode.rb
# return the address of a label
return the address of a label
return the address of a label
def label_addr(name)
		if name.kind_of? Integer
			name
		elsif s = @segments.find { |s_| s_.encoded and s_.encoded.export[name] }
			s.vaddr + s.encoded.export[name]
		elsif o = @encoded.export[name] and s = @segments.find { |s_| s_.offset <= o and s_.offset + s_.filesz > o }
			s.vaddr + o - s.offset
		end
	end
def label_addr ( name ) if name . kind_of? Integer name elsif s = @segments . find { | s_ | s_ . encoded and s_ . encoded . export [ name ] } s . vaddr + s . encoded . export [ name ] elsif o = @encoded . export [ name ] and s = @segments . find { | s_ | s_ . offset <= o and s_ . offset + s_ . filesz > o } s . vaddr + o - s . offset end end
return the address of a label
return the address of a label
name