+++ /dev/null
-#!/bin/sh
-# Copyright 2010 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Run nacl binary in debug mode (allow file access)
-# and then grep away the chatter.
-# See ../../src/pkg/exp/nacl/README for more on
-# how to configure NaCl.
-
-nacl -d "$@" >/tmp/nacl.out.$$ 2>&1
-status=$?
-egrep -v 'DEBUG MODE ENABLED|^\[[0-9]+,' /tmp/nacl.out.$$
-rm -f /tmp/nacl.out.$$
-exit $status
break;
Elfput:
- /* elf 386 */
- if(HEADTYPE == Htiny)
- debug['d'] = 1;
-
eh = getElfEhdr();
startva = INITTEXT - HEADR;
"msdosexe", Hmsdosexe,
"darwin", Hdarwin,
"linux", Hlinux,
- "nacl", Hnacl,
"freebsd", Hfreebsd,
"windows", Hwindows,
"windowsgui", Hwindows,
- "tiny", Htiny,
0, 0
};
* -Hmsdosexe -Tx -Rx is fake MS-DOS .EXE
* -Hdarwin -Tx -Rx is Apple Mach-O
* -Hlinux -Tx -Rx is Linux ELF32
- * -Hnacl -Tx -Rx was Google Native Client
* -Hfreebsd -Tx -Rx is FreeBSD ELF32
* -Hwindows -Tx -Rx is MS Windows PE32
- * -Htiny -Tx -Rx is tiny (os image)
*/
void
if(INITRND == -1)
INITRND = PESECTALIGN;
break;
- case Htiny:
- tlsoffset = 0;
- elfinit();
- HEADR = ELFRESERVE;
- if(INITTEXT == -1)
- INITTEXT = 0x100000+HEADR;
- if(INITDAT == -1)
- INITDAT = 0;
- if(INITRND == -1)
- INITRND = 4096;
- break;
}
if(INITDAT != 0 && INITRND != 0)
print("warning: -D0x%ux is ignored because of -R0x%ux\n",
#define ELFOSABI_OPENVMS 13 /* Open VMS */
#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */
#define ELFOSABI_ARM 97 /* ARM */
-#define ELFOSABI_NACL 123 /* Native Client */
#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */
Hipaq, // ipaq
Hdarwin, // Apple Mach-O
Hlinux, // Linux ELF
- Hnacl, // Google Native Client
Hfreebsd, // FreeBSD ELF
Hwindows, // MS Windows PE
- Htiny // tiny (os image)
};
typedef struct Header Header;
case "$GOARCH" in
386)
# The offsets 0 and 4 are also known to:
- # nacl/thread.c:/^newosproc
# ../../cmd/8l/pass.c:/D_GS
# ../../libcgo/linux_386.c:/^threadentry
# ../../libcgo/darwin_386.c:/^threadentry
my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
my $errors = 0;
my $_32bit = "";
-my $nacl = 0;
my $plan9 = 0;
if($ARGV[0] eq "-b32") {
$_32bit = "little-endian";
shift;
}
-if($ARGV[0] eq "-nacl") {
- $nacl = 1;
- shift;
-}
if($ARGV[0] eq "-plan9") {
$plan9 = 1;
shift;
exit 1
esac
-case X"$GOOS" in
-Xnacl)
- export E=${GORUN:-$GOROOT/misc/nacl/naclrun}
-esac
-
export G=${A}g
export L=${A}l
export GOTRACEBACK=0
/^Trace\/BPT trap/d
/RUNFILE/ s/line 1: *[0-9]*/line 1: PID/
/^\$RUNFILE: line 1: PID Trace\/breakpoint trap/d
- /Fault in NaCl untrusted code/d
/Segmentation fault/d
/^qemu: uncaught target signal 11 (Segmentation fault) - exiting/d' > run.out