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

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

Issue 10174016: link with validator_ragel only in standalone binaries (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: indentation 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
« no previous file with comments | « src/trusted/service_runtime/arch/x86/service_runtime_x86.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "native_client/src/shared/platform/nacl_log.h" 7 #include "native_client/src/shared/platform/nacl_log.h"
8 #include "native_client/src/trusted/service_runtime/sel_ldr.h" 8 #include "native_client/src/trusted/service_runtime/sel_ldr.h"
9 #include "native_client/src/trusted/validator/ncvalidate.h" 9 #include "native_client/src/trusted/validator/ncvalidate.h"
10 10
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 } 28 }
29 29
30 typedef NaClValidationStatus (*ValidateFunc) ( 30 typedef NaClValidationStatus (*ValidateFunc) (
31 uintptr_t, uint8_t*, size_t, int, int, 31 uintptr_t, uint8_t*, size_t, int, int,
32 const NaClCPUFeatures*, struct NaClValidationCache*); 32 const NaClCPUFeatures*, struct NaClValidationCache*);
33 33
34 static ValidateFunc NaClSelectValidator(struct NaClApp *nap) { 34 static ValidateFunc NaClSelectValidator(struct NaClApp *nap) {
35 ValidateFunc ret = NACL_SUBARCH_NAME(ApplyValidator, 35 ValidateFunc ret = NACL_SUBARCH_NAME(ApplyValidator,
36 NACL_TARGET_ARCH, NACL_TARGET_SUBARCH); 36 NACL_TARGET_ARCH, NACL_TARGET_SUBARCH);
37 #ifdef __arm__ 37 /* Avoid linking two validators into Chromium to keep download size small. */
38 #if defined(__arm__) || !defined(NACL_STANDALONE)
38 UNREFERENCED_PARAMETER(nap); 39 UNREFERENCED_PARAMETER(nap);
39 #else 40 #else
40 if (nap->enable_dfa_validator) { 41 if (nap->enable_dfa_validator) {
41 ret = NACL_SUBARCH_NAME(ApplyDfaValidator, 42 ret = NACL_SUBARCH_NAME(ApplyDfaValidator,
42 NACL_TARGET_ARCH, NACL_TARGET_SUBARCH); 43 NACL_TARGET_ARCH, NACL_TARGET_SUBARCH);
43 } 44 }
44 #endif 45 #endif
45 return ret; 46 return ret;
46 } 47 }
47 48
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 NaClLog(LOG_ERROR, 165 NaClLog(LOG_ERROR,
165 "Run sel_ldr in debug mode to ignore validation failure.\n"); 166 "Run sel_ldr in debug mode to ignore validation failure.\n");
166 NaClLog(LOG_ERROR, 167 NaClLog(LOG_ERROR,
167 "Run ncval <module-name> for validation error details.\n"); 168 "Run ncval <module-name> for validation error details.\n");
168 rcode = LOAD_VALIDATION_FAILED; 169 rcode = LOAD_VALIDATION_FAILED;
169 } 170 }
170 } 171 }
171 } 172 }
172 return rcode; 173 return rcode;
173 } 174 }
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/arch/x86/service_runtime_x86.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698