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

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: added a comment explaining the ugly copypasting Created 8 years, 8 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 "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 #if defined(__arm__) || !defined (NACL_STANDALONE)
Mark Seaborn 2012/04/25 16:48:43 No space after 'defined'. Can you add a comment h
pasko-google - do not use 2012/04/25 17:32:03 Done.
38 UNREFERENCED_PARAMETER(nap); 38 UNREFERENCED_PARAMETER(nap);
39 #else 39 #else
40 if (nap->enable_dfa_validator) { 40 if (nap->enable_dfa_validator) {
41 ret = NACL_SUBARCH_NAME(ApplyDfaValidator, 41 ret = NACL_SUBARCH_NAME(ApplyDfaValidator,
42 NACL_TARGET_ARCH, NACL_TARGET_SUBARCH); 42 NACL_TARGET_ARCH, NACL_TARGET_SUBARCH);
43 } 43 }
44 #endif 44 #endif
45 return ret; 45 return ret;
46 } 46 }
47 47
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 NaClLog(LOG_ERROR, 164 NaClLog(LOG_ERROR,
165 "Run sel_ldr in debug mode to ignore validation failure.\n"); 165 "Run sel_ldr in debug mode to ignore validation failure.\n");
166 NaClLog(LOG_ERROR, 166 NaClLog(LOG_ERROR,
167 "Run ncval <module-name> for validation error details.\n"); 167 "Run ncval <module-name> for validation error details.\n");
168 rcode = LOAD_VALIDATION_FAILED; 168 rcode = LOAD_VALIDATION_FAILED;
169 } 169 }
170 } 170 }
171 } 171 }
172 return rcode; 172 return rcode;
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698