| OLD | NEW |
| (Empty) |
| 1 /* | |
| 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 | |
| 4 * found in the LICENSE file. | |
| 5 */ | |
| 6 | |
| 7 /* | |
| 8 * The ELF entry point ABI is such that assembly code is required to | |
| 9 * call the entry point. | |
| 10 * See http://code.google.com/p/nativeclient/issues/detail?id=1131 | |
| 11 */ | |
| 12 | |
| 13 #include "native_client/src/trusted/service_runtime/nacl_config.h" | |
| 14 | |
| 15 /* | |
| 16 * arg 1: r0, new stack pointer | |
| 17 * arg 2: r1, entry point | |
| 18 * arg 3: r2, atexit function, to be left in r0 | |
| 19 */ | |
| 20 .global jump_to_elf_start | |
| 21 jump_to_elf_start: | |
| 22 mov sp, r0 | |
| 23 bic sp, sp, #NACL_DATA_FLOW_MASK | |
| 24 | |
| 25 mov r0, r2 | |
| 26 nop | |
| 27 | |
| 28 bic r1, r1, #NACL_CONTROL_FLOW_MASK | |
| 29 bx r1 | |
| OLD | NEW |