node/lib/metasm/metasm/exe_format/elf_decode.rb
def fileoff_to_addr(foff)
		if s = @segments.find { |s_| s_.type == 'LOAD' and s_.offset <= foff and s_.offset + s_.filesz > foff }
			la = module_address
			la = (la == 0 ? (@load_address ||= 0) : 0)
			s.vaddr + la + foff - s.offset
		end
	end
# file offset -> memory address
# handles relocated LoadedELF
file offset -> memory address
handles relocated LoadedELF
file offset - > memory address handles relocated LoadedELF
def fileoff_to_addr(foff)
		if s = @segments.find { |s_| s_.type == 'LOAD' and s_.offset <= foff and s_.offset + s_.filesz > foff }
			la = module_address
			la = (la == 0 ? (@load_address ||= 0) : 0)
			s.vaddr + la + foff - s.offset
		end
	end
def fileoff_to_addr ( foff ) if s = @segments . find { | s_ | s_ . type == 'LOAD' and s_ . offset <= foff and s_ . offset + s_ . filesz > foff } la = module_address la = ( la == 0 ? ( @load_address ||= 0 ) : 0 ) s . vaddr + la + foff - s . offset end end
file offset -> memory address
handles relocated LoadedELF
file offset - > memory address handles relocated LoadedELF
foff