Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: src/trusted/service_runtime/sel_ldr.c

Issue 10134056: Refactor the process of choosing validators. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: portability.h instead of NACL_WINDOWS Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 struct NaClDescEffectorLdr *effp; 68 struct NaClDescEffectorLdr *effp;
69 69
70 /* Get the set of features that the CPU we're running on supports. */ 70 /* Get the set of features that the CPU we're running on supports. */
71 /* These may be adjusted later in sel_main.c for fixed-feature CPU mode. */ 71 /* These may be adjusted later in sel_main.c for fixed-feature CPU mode. */
72 NaClGetCurrentCPUFeatures(&nap->cpu_features); 72 NaClGetCurrentCPUFeatures(&nap->cpu_features);
73 nap->fixed_feature_cpu_mode = 0; 73 nap->fixed_feature_cpu_mode = 0;
74 74
75 /* The validation cache will be injected later, if it exists. */ 75 /* The validation cache will be injected later, if it exists. */
76 nap->validation_cache = NULL; 76 nap->validation_cache = NULL;
77 77
78 nap->enable_dfa_validator = 0; 78 nap->validator = NaClCreateValidator();
79 79
80 nap->addr_bits = NACL_MAX_ADDR_BITS; 80 nap->addr_bits = NACL_MAX_ADDR_BITS;
81 81
82 nap->stack_size = NACL_DEFAULT_STACK_MAX; 82 nap->stack_size = NACL_DEFAULT_STACK_MAX;
83 83
84 nap->aux_info = NULL; 84 nap->aux_info = NULL;
85 85
86 nap->mem_start = 0; 86 nap->mem_start = 0;
87 87
88 #if (NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 \ 88 #if (NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 \
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 nacl_global_xlate_base = mem_start; 1742 nacl_global_xlate_base = mem_start;
1743 1743
1744 NaClSandboxMemoryStartForValgrind(mem_start); 1744 NaClSandboxMemoryStartForValgrind(mem_start);
1745 1745
1746 _ovly_debug_event(); 1746 _ovly_debug_event();
1747 } 1747 }
1748 1748
1749 void NaClGdbHook(struct NaClApp const *nap) { 1749 void NaClGdbHook(struct NaClApp const *nap) {
1750 StopForDebuggerInit(nap->mem_start); 1750 StopForDebuggerInit(nap->mem_start);
1751 } 1751 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698