def function_offsets(file, functions)
      arch = architecture(file)
      objdump_bin = find_objdump(arch)
      objdump_cmd = ::Shellwords.join([objdump_bin, '-T', file])
      functions.map! { |f| '\\b' + f + '\\b' }
      ret = {}
      `#{objdump_cmd} | grep -iP '(#{functions.join('|')})'`.lines.map(&:chomp).each do |line|
        tokens = line.split
        ret[tokens.last] = tokens.first.to_i(16)
      end
      ret
    end
def function_offsets(file, functions)
      arch = architecture(file)
      objdump_bin = find_objdump(arch)
      objdump_cmd = ::Shellwords.join([objdump_bin, '-T', file])
      functions.map! { |f| '\\b' + f + '\\b' }
      ret = {}
      `#{objdump_cmd} | grep -iP '(#{functions.join('|')})'`.lines.map(&:chomp).each do |line|
        tokens = line.split
        ret[tokens.last] = tokens.first.to_i(16)
      end
      ret
    end
Returns a dictionary that maps functions to their offsets.
 @param [String] file
 @param [Array<String>] functions
 @return [Hash{String => Integer}]