| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2011 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/include/portability_string.h" | 7 #include "native_client/src/include/portability_string.h" |
| 8 #include "native_client/src/include/nacl_macros.h" | 8 #include "native_client/src/include/nacl_macros.h" |
| 9 #include "native_client/src/include/nacl_platform.h" | 9 #include "native_client/src/include/nacl_platform.h" |
| 10 #include "native_client/src/shared/platform/nacl_check.h" | 10 #include "native_client/src/shared/platform/nacl_check.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 | 111 |
| 112 /* | 112 /* |
| 113 * Install a syscall trampoline at target_addr. NB: Thread-safe. | 113 * Install a syscall trampoline at target_addr. NB: Thread-safe. |
| 114 */ | 114 */ |
| 115 void NaClPatchOneTrampolineCall(uintptr_t call_target_addr, | 115 void NaClPatchOneTrampolineCall(uintptr_t call_target_addr, |
| 116 uintptr_t target_addr) { | 116 uintptr_t target_addr) { |
| 117 struct NaClPatchInfo patch_info; | 117 struct NaClPatchInfo patch_info; |
| 118 struct NaClPatch call_target; | 118 struct NaClPatch call_target; |
| 119 | 119 |
| 120 NaClLog(4, "call_target_addr = 0x%"NACL_PRIxPTR"\n", call_target_addr); | 120 NaClLog(6, "call_target_addr = 0x%"NACL_PRIxPTR"\n", call_target_addr); |
| 121 CHECK(0 != call_target_addr); | 121 CHECK(0 != call_target_addr); |
| 122 call_target.target = (((uintptr_t) &NaCl_trampoline_call_target) | 122 call_target.target = (((uintptr_t) &NaCl_trampoline_call_target) |
| 123 - sizeof(uintptr_t)); | 123 - sizeof(uintptr_t)); |
| 124 call_target.value = call_target_addr; | 124 call_target.value = call_target_addr; |
| 125 | 125 |
| 126 NaClPatchInfoCtor(&patch_info); | 126 NaClPatchInfoCtor(&patch_info); |
| 127 | 127 |
| 128 patch_info.abs64 = &call_target; | 128 patch_info.abs64 = &call_target; |
| 129 patch_info.num_abs64 = 1; | 129 patch_info.num_abs64 = 1; |
| 130 | 130 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 156 (void *) (nap->mem_start + NACL_TRAMPOLINE_START), | 156 (void *) (nap->mem_start + NACL_TRAMPOLINE_START), |
| 157 NACL_TRAMPOLINE_SIZE); | 157 NACL_TRAMPOLINE_SIZE); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void NaClLoadSpringboard(struct NaClApp *nap) { | 160 void NaClLoadSpringboard(struct NaClApp *nap) { |
| 161 /* | 161 /* |
| 162 * There is no springboard for x86-64. | 162 * There is no springboard for x86-64. |
| 163 */ | 163 */ |
| 164 UNREFERENCED_PARAMETER(nap); | 164 UNREFERENCED_PARAMETER(nap); |
| 165 } | 165 } |
| OLD | NEW |