| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008, Google Inc. | 2 * Copyright 2008, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 35 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
| 36 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h
" | 36 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h
" |
| 37 | 37 |
| 38 /* | 38 /* |
| 39 * Assembly code template. This is linked into the service runtime | 39 * Assembly code template. This is linked into the service runtime |
| 40 * but is unused as code -- it is used as data to be patched into | 40 * but is unused as code -- it is used as data to be patched into |
| 41 * a NaCl app's address space as a "hidden" part of its trampoline | 41 * a NaCl app's address space as a "hidden" part of its trampoline |
| 42 * region. | 42 * region. |
| 43 */ | 43 */ |
| 44 | 44 |
| 45 .globl IDENTIFIER(NaCl_springboard) | |
| 46 .globl IDENTIFIER(NaCl_springboard_end) | |
| 47 | |
| 48 /* | 45 /* |
| 49 * NaCl_pringboard is used for syscall return and any time we want | 46 * NaCl_springboard is used for syscall return and any time we want |
| 50 * to do an upcall into NaCl application. | 47 * to do an upcall into NaCl application. |
| 51 */ | 48 */ |
| 52 | 49 |
| 50 .globl IDENTIFIER(NaCl_springboard) |
| 51 HIDDEN(NaCl_springboard) |
| 53 IDENTIFIER(NaCl_springboard): | 52 IDENTIFIER(NaCl_springboard): |
| 54 hlt /* one byte */ | 53 hlt /* one byte */ |
| 55 /* syscall return value, if any, from trusted stack */ | 54 /* syscall return value, if any, from trusted stack */ |
| 56 mov 0x34(%ecx), %eax /* sysret */ | 55 mov 0x34(%ecx), %eax /* sysret */ |
| 57 lss 0x1c(%ecx), %esp /* stack_ptr.ptr_32.ptr */ | 56 lss 0x1c(%ecx), %esp /* stack_ptr.ptr_32.ptr */ |
| 58 mov 0x28(%ecx), %ds /* ds */ | 57 mov 0x28(%ecx), %ds /* ds */ |
| 59 jmp *%edx | 58 jmp *%edx |
| 59 .globl IDENTIFIER(NaCl_springboard_end) |
| 60 HIDDEN(NaCl_springboard_end) |
| 60 IDENTIFIER(NaCl_springboard_end): | 61 IDENTIFIER(NaCl_springboard_end): |
| OLD | NEW |