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

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

Issue 12600034: Provide metadata to validator to allow faster caching. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: First fixes Created 7 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 /* 7 /*
8 * NaCl Simple/secure ELF loader (NaCl SEL). 8 * NaCl Simple/secure ELF loader (NaCl SEL).
9 */ 9 */
10 10
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 NaClPerfCounterMark(&time_load_file, "EndLoadFile"); 403 NaClPerfCounterMark(&time_load_file, "EndLoadFile");
404 NaClPerfCounterIntervalTotal(&time_load_file); 404 NaClPerfCounterIntervalTotal(&time_load_file);
405 return ret; 405 return ret;
406 } 406 }
407 407
408 NaClErrorCode NaClAppLoadFile(struct Gio *gp, 408 NaClErrorCode NaClAppLoadFile(struct Gio *gp,
409 struct NaClApp *nap) { 409 struct NaClApp *nap) {
410 return NaClAppLoadFileAslr(gp, nap, NACL_ENABLE_ASLR); 410 return NaClAppLoadFileAslr(gp, nap, NACL_ENABLE_ASLR);
411 } 411 }
412 412
413 NaClErrorCode NaClAppLoadFileDynamically(struct NaClApp *nap, 413 NaClErrorCode NaClAppLoadFileDynamically(
414 struct Gio *gio_file) { 414 struct NaClApp *nap,
415 struct Gio *gio_file,
416 struct NaClValidationMetadata *metadata) {
415 struct NaClElfImage *image = NULL; 417 struct NaClElfImage *image = NULL;
416 NaClErrorCode ret = LOAD_INTERNAL; 418 NaClErrorCode ret = LOAD_INTERNAL;
417 419
418 image = NaClElfImageNew((struct Gio *) gio_file, &ret); 420 image = NaClElfImageNew((struct Gio *) gio_file, &ret);
419 if (NULL == image || LOAD_OK != ret) { 421 if (NULL == image || LOAD_OK != ret) {
420 goto done; 422 goto done;
421 } 423 }
422 ret = NaClElfImageLoadDynamically(image, nap, gio_file); 424 ret = NaClElfImageLoadDynamically(image, nap, gio_file, metadata);
423 if (LOAD_OK != ret) { 425 if (LOAD_OK != ret) {
424 goto done; 426 goto done;
425 } 427 }
426 nap->user_entry_pt = nap->initial_entry_pt; 428 nap->user_entry_pt = nap->initial_entry_pt;
427 nap->initial_entry_pt = NaClElfImageGetEntryPoint(image); 429 nap->initial_entry_pt = NaClElfImageGetEntryPoint(image);
428 430
429 done: 431 done:
430 NaClElfImageDelete(image); 432 NaClElfImageDelete(image);
431 return ret; 433 return ret;
432 } 434 }
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 NaClSysToUserStackAddr(nap, sys_stack_ptr), 919 NaClSysToUserStackAddr(nap, sys_stack_ptr),
918 user_tls1, 920 user_tls1,
919 user_tls2)) { 921 user_tls2)) {
920 NaClLog(LOG_WARNING, 922 NaClLog(LOG_WARNING,
921 ("NaClCreateAdditionalThread: could not allocate thread." 923 ("NaClCreateAdditionalThread: could not allocate thread."
922 " Returning EAGAIN per POSIX specs.\n")); 924 " Returning EAGAIN per POSIX specs.\n"));
923 return -NACL_ABI_EAGAIN; 925 return -NACL_ABI_EAGAIN;
924 } 926 }
925 return 0; 927 return 0;
926 } 928 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698