blob: 1e4bd31c9b11bd1f64c268d4d82acf549167b637 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#!/bin/bash
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Usage: nacl_interp_loader.sh PLATFORM NEXE ARGS...
# Assumes this file is sitting in the source tree.
# This should be changed for some proper SDK installation setup.
NACL_SDK_ROOT=${NACL_SDK_ROOT:-/path/to/naclsdk/pepper_XX}
case "$1" in
i?86)
arch=x86_32
libdir=lib32
;;
x86_64)
arch=x86_64
libdir=lib64
;;
arm|v7l)
arch=arm
libdir=lib32
;;
*)
echo >&2 "$0: Do not recognize architecture \"$1\""
exit 127
;;
esac
shift
case "${NACL_SDK_ROOT}" in
*pepper_15* | *pepper_16* | *pepper_17*)
SEL_LDR="$NACL_SDK_ROOT/toolchain/linux_x86/bin/sel_ldr_${arch}"
IRT="$NACL_SDK_ROOT/toolchain/linux_x86/runtime/irt_core_${arch}.nexe"
RTLD="$NACL_SDK_ROOT/toolchain/linux_x86/x86_64-nacl/${libdir}/runnable-ld.so"
LIBDIR="$NACL_SDK_ROOT/toolchain/linux_x86/x86_64-nacl/${libdir}"
;;
*)
SEL_LDR="$NACL_SDK_ROOT/tools/sel_ldr_${arch}"
IRT="$NACL_SDK_ROOT/tools/irt_core_${arch}.nexe"
RTLD="$NACL_SDK_ROOT/toolchain/linux_x86_glibc/x86_64-nacl/${libdir}/runnable-ld.so"
LIBDIR="$NACL_SDK_ROOT/toolchain/linux_x86_glibc/x86_64-nacl/${libdir}"
;;
esac
IGNORE_VALIDATOR_ARG=""
if [ x"$NACL_IGNORE_VALIDATOR" == x"1" ]; then
IGNORE_VALIDATOR_ARG="-c"
fi
exec "$SEL_LDR" -E "NACL_PWD=`pwd`" -E "MONO_PATH=$MONO_PATH" \
-E "MONO_CFG_DIR=$MONO_CFG_DIR" -E "MONO_SHARED_DIR=$MONO_SHARED_DIR" \
-a $IGNORE_VALIDATOR_ARG -S -B "$IRT" -l /dev/null -- "$RTLD" \
--library-path $LIBDIR "$@"
|