1#!/bin/bash 2 3# Execute crosvm using the Bionic linker. This is because DT_INTERP of the 4# host rust binaries are incorrectly set to /system/bin/linker64. The path 5# doesn't exist on host targets, but this is unavoidable because we are 6# building the host rust binaries using "-target aarch64-linux-android". 7# The target is for Android and therefore DT_INTERP is set to that of Android. 8# We have to use the target until rustc supports non-Android target using Bionic 9# as libc. Until then, let's override DT_INTERP by executing the dynamic linker 10# and feed the absolute path to the rust binary as the first argument. 11exec $(dirname $0)/linker64 $(readlink -f $(dirname $0)/$(uname -m)-linux-bionic/$(basename "$0")) "${@}" 12