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 nap->validation_cache_context = NULL; |
| 85 |
82 nap->addr_bits = NACL_MAX_ADDR_BITS; | 86 nap->addr_bits = NACL_MAX_ADDR_BITS; |
83 | 87 |
84 nap->stack_size = NACL_DEFAULT_STACK_MAX; | 88 nap->stack_size = NACL_DEFAULT_STACK_MAX; |
85 | 89 |
86 nap->aux_info = NULL; | 90 nap->aux_info = NULL; |
87 | 91 |
88 nap->mem_start = 0; | 92 nap->mem_start = 0; |
89 | 93 |
90 #if (NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 \ | 94 #if (NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 \ |
91 && NACL_BUILD_SUBARCH == 32 && __PIC__) | 95 && NACL_BUILD_SUBARCH == 32 && __PIC__) |
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 nacl_global_xlate_base = mem_start; | 1730 nacl_global_xlate_base = mem_start; |
1727 | 1731 |
1728 NaClSandboxMemoryStartForValgrind(mem_start); | 1732 NaClSandboxMemoryStartForValgrind(mem_start); |
1729 | 1733 |
1730 _ovly_debug_event(); | 1734 _ovly_debug_event(); |
1731 } | 1735 } |
1732 | 1736 |
1733 void NaClGdbHook(struct NaClApp const *nap) { | 1737 void NaClGdbHook(struct NaClApp const *nap) { |
1734 StopForDebuggerInit(nap->mem_start); | 1738 StopForDebuggerInit(nap->mem_start); |
1735 } | 1739 } |
OLD | NEW |