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 /* | 7 /* |
8 * NaCl helper functions to deal with elf images | 8 * NaCl helper functions to deal with elf images |
9 */ | 9 */ |
10 | 10 |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 NaClMetadataFromNaClDescCtor(&metadata, ndp); | 641 NaClMetadataFromNaClDescCtor(&metadata, ndp); |
642 CHECK(segment_size == nap->static_text_end - NACL_TRAMPOLINE_END); | 642 CHECK(segment_size == nap->static_text_end - NACL_TRAMPOLINE_END); |
643 validator_status = NACL_FI_VAL( | 643 validator_status = NACL_FI_VAL( |
644 "ELF_LOAD_FORCE_VALIDATION_STATUS", | 644 "ELF_LOAD_FORCE_VALIDATION_STATUS", |
645 enum NaClValidationStatus, | 645 enum NaClValidationStatus, |
646 (*nap->validator-> | 646 (*nap->validator-> |
647 Validate)(vaddr, | 647 Validate)(vaddr, |
648 (uint8_t *) image_sys_addr, | 648 (uint8_t *) image_sys_addr, |
649 segment_size, /* actual size */ | 649 segment_size, /* actual size */ |
650 0, /* stubout_mode: no */ | 650 0, /* stubout_mode: no */ |
| 651 nap->pnacl_mode ? DISABLE_NONTEMPORALS : 0, |
651 1, /* readonly_text: yes */ | 652 1, /* readonly_text: yes */ |
652 nap->cpu_features, | 653 nap->cpu_features, |
653 &metadata, | 654 &metadata, |
654 nap->validation_cache)); | 655 nap->validation_cache)); |
655 NaClPerfCounterMark(&time_mmap_segment, "ValidateMapped"); | 656 NaClPerfCounterMark(&time_mmap_segment, "ValidateMapped"); |
656 NaClPerfCounterIntervalLast(&time_mmap_segment); | 657 NaClPerfCounterIntervalLast(&time_mmap_segment); |
657 NaClLog(3, "NaClElfFileMapSegment: validator_status %d\n", | 658 NaClLog(3, "NaClElfFileMapSegment: validator_status %d\n", |
658 validator_status); | 659 validator_status); |
659 NaClMetadataDtor(&metadata); | 660 NaClMetadataDtor(&metadata); |
660 /* | 661 /* |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 } | 1023 } |
1023 | 1024 |
1024 void NaClElfImageDelete(struct NaClElfImage *image) { | 1025 void NaClElfImageDelete(struct NaClElfImage *image) { |
1025 free(image); | 1026 free(image); |
1026 } | 1027 } |
1027 | 1028 |
1028 | 1029 |
1029 uintptr_t NaClElfImageGetEntryPoint(struct NaClElfImage *image) { | 1030 uintptr_t NaClElfImageGetEntryPoint(struct NaClElfImage *image) { |
1030 return image->ehdr.e_entry; | 1031 return image->ehdr.e_entry; |
1031 } | 1032 } |
OLD | NEW |