| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 * on stack: | 44 * on stack: |
| 45 * | 45 * |
| 46 * syscall-arg-N | 46 * syscall-arg-N |
| 47 * ... | 47 * ... |
| 48 * syscall-arg-1 | 48 * syscall-arg-1 |
| 49 * RA for caller to libc stub | 49 * RA for caller to libc stub |
| 50 * code seg from trampoline lcall | 50 * code seg from trampoline lcall |
| 51 * RA for trampoline lcall (used to compute syscall number) | 51 * RA for trampoline lcall (used to compute syscall number) |
| 52 */ | 52 */ |
| 53 | 53 |
| 54 .globl IDENTIFIER(nacl_user) | 54 .globl IDENTIFIER(NaClSyscallSeg) |
| 55 .globl IDENTIFIER(nacl_sys) | 55 HIDDEN(NaClSyscallSeg) |
| 56 | |
| 57 .globl IDENTIFIER(NaClSyscallCSegHook) | |
| 58 .globl IDENTIFIER(NaClSyscallSeg) | |
| 59 IDENTIFIER(NaClSyscallSeg): | 56 IDENTIFIER(NaClSyscallSeg): |
| 60 /* | 57 /* |
| 61 * Visual Studio "protects" the stack in compiler generated prolog | 58 * Visual Studio "protects" the stack in compiler generated prolog |
| 62 * using an unprotected rep prefix (the /GS option): | 59 * using an unprotected rep prefix (the /GS option): |
| 63 | 60 |
| 64 0040115F: 8D BD AC FD FF FF lea edi,[ebp-254h] | 61 0040115F: 8D BD AC FD FF FF lea edi,[ebp-254h] |
| 65 00401165: B9 8F 00 00 00 mov ecx,8Fh | 62 00401165: B9 8F 00 00 00 mov ecx,8Fh |
| 66 0040116A: B8 CC CC CC CC mov eax,0CCCCCCCCh | 63 0040116A: B8 CC CC CC CC mov eax,0CCCCCCCCh |
| 67 0040116F: F3 AB rep stos dword ptr es:[edi] | 64 0040116F: F3 AB rep stos dword ptr es:[edi] |
| 68 | 65 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 mov %ecx, %ss /* disable intr */ | 134 mov %ecx, %ss /* disable intr */ |
| 138 movl %edx, %esp | 135 movl %edx, %esp |
| 139 push %eax | 136 push %eax |
| 140 call IDENTIFIER(NaClSyscallCSegHook) | 137 call IDENTIFIER(NaClSyscallCSegHook) |
| 141 /* | 138 /* |
| 142 * If stack usage in the above code changes, modify initial %esp | 139 * If stack usage in the above code changes, modify initial %esp |
| 143 * computation -- see nacl_switch_to_app.c:NaClStartThreadInApp. | 140 * computation -- see nacl_switch_to_app.c:NaClStartThreadInApp. |
| 144 */ | 141 */ |
| 145 hlt | 142 hlt |
| 146 /* noret */ | 143 /* noret */ |
| OLD | NEW |