OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 /* | 9 /* |
10 * NaCl Simple/secure ELF loader (NaCl SEL). | 10 * NaCl Simple/secure ELF loader (NaCl SEL). |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return !IsEnvironmentVariableSet("NACL_DISABLE_DYNAMIC_LOADING"); | 72 return !IsEnvironmentVariableSet("NACL_DISABLE_DYNAMIC_LOADING"); |
73 } | 73 } |
74 | 74 |
75 int NaClAppWithSyscallTableCtor(struct NaClApp *nap, | 75 int NaClAppWithSyscallTableCtor(struct NaClApp *nap, |
76 struct NaClSyscallTableEntry *table) { | 76 struct NaClSyscallTableEntry *table) { |
77 struct NaClDescEffectorLdr *effp; | 77 struct NaClDescEffectorLdr *effp; |
78 | 78 |
79 /* Get the set of features that the CPU we're running on supports. */ | 79 /* Get the set of features that the CPU we're running on supports. */ |
80 NaClGetCurrentCPUFeatures(&nap->cpu_features); | 80 NaClGetCurrentCPUFeatures(&nap->cpu_features); |
81 | 81 |
| 82 /* The validation cache will be injected later, if it exists. */ |
| 83 nap->validation_cache = NULL; |
| 84 |
82 nap->addr_bits = NACL_MAX_ADDR_BITS; | 85 nap->addr_bits = NACL_MAX_ADDR_BITS; |
83 | 86 |
84 nap->stack_size = NACL_DEFAULT_STACK_MAX; | 87 nap->stack_size = NACL_DEFAULT_STACK_MAX; |
85 | 88 |
86 nap->aux_info = NULL; | 89 nap->aux_info = NULL; |
87 | 90 |
88 nap->mem_start = 0; | 91 nap->mem_start = 0; |
89 | 92 |
90 #if (NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 \ | 93 #if (NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 \ |
91 && NACL_BUILD_SUBARCH == 32 && __PIC__) | 94 && NACL_BUILD_SUBARCH == 32 && __PIC__) |
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 nacl_global_xlate_base = mem_start; | 1726 nacl_global_xlate_base = mem_start; |
1724 | 1727 |
1725 NaClSandboxMemoryStartForValgrind(mem_start); | 1728 NaClSandboxMemoryStartForValgrind(mem_start); |
1726 | 1729 |
1727 _ovly_debug_event(); | 1730 _ovly_debug_event(); |
1728 } | 1731 } |
1729 | 1732 |
1730 void NaClGdbHook(struct NaClApp const *nap) { | 1733 void NaClGdbHook(struct NaClApp const *nap) { |
1731 StopForDebuggerInit(nap->mem_start); | 1734 StopForDebuggerInit(nap->mem_start); |
1732 } | 1735 } |
OLD | NEW |