| 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 22 matching lines...) Expand all Loading... |
| 33 * NaCl Simple/secure ELF loader (NaCl SEL). | 33 * NaCl Simple/secure ELF loader (NaCl SEL). |
| 34 */ | 34 */ |
| 35 | 35 |
| 36 /* | 36 /* |
| 37 Trampoline to transfer control from native client module to | 37 Trampoline to transfer control from native client module to |
| 38 sel_ldr's NaClSyscallSeg residing in the same address space | 38 sel_ldr's NaClSyscallSeg residing in the same address space |
| 39 */ | 39 */ |
| 40 | 40 |
| 41 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 41 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
| 42 | 42 |
| 43 » .text | 43 .text |
| 44 » .globl» IDENTIFIER(NaCl_trampoline_seg_code) | 44 .globl IDENTIFIER(NaCl_trampoline_seg_code) |
| 45 » .globl» IDENTIFIER(NaCl_tramp_dseg_patch) | 45 HIDDEN(NaCl_trampoline_seg_code) |
| 46 » .globl» IDENTIFIER(NaCl_tramp_cseg_patch) | |
| 47 » .globl» IDENTIFIER(NaCl_trampoline_seg_end) | |
| 48 IDENTIFIER(NaCl_trampoline_seg_code): | 46 IDENTIFIER(NaCl_trampoline_seg_code): |
| 49 » movl» $0xdeadbeef, %eax | 47 movl $0xdeadbeef, %eax |
| 48 .globl IDENTIFIER(NaCl_tramp_dseg_patch) |
| 49 HIDDEN(NaCl_tramp_dseg_patch) |
| 50 IDENTIFIER(NaCl_tramp_dseg_patch): | 50 IDENTIFIER(NaCl_tramp_dseg_patch): |
| 51 » mov» %eax, %ds /* remove data sandbox */ | 51 mov %eax, %ds /* remove data sandbox */ |
| 52 » lcall» $0xcafe, $0xdeadbeef | 52 lcall $0xcafe, $0xdeadbeef |
| 53 » /* trampoline installer will s/0xdeadbeef/NaClSyscallSeg/ */ | 53 /* trampoline installer will s/0xdeadbeef/NaClSyscallSeg/ */ |
| 54 .globl IDENTIFIER(NaCl_tramp_cseg_patch) |
| 55 HIDDEN(NaCl_tramp_cseg_patch) |
| 54 IDENTIFIER(NaCl_tramp_cseg_patch): | 56 IDENTIFIER(NaCl_tramp_cseg_patch): |
| 55 » ret | 57 ret |
| 58 .globl IDENTIFIER(NaCl_trampoline_seg_end) |
| 56 IDENTIFIER(NaCl_trampoline_seg_end): | 59 IDENTIFIER(NaCl_trampoline_seg_end): |
| 57 | 60 |
| 58 » .globl» IDENTIFIER(NaCl_text_prot) | 61 .globl IDENTIFIER(NaCl_text_prot) |
| 59 » .globl» IDENTIFIER(NaCl_text_prot_end) | 62 HIDDEN(NaCl_text_prot) |
| 60 | |
| 61 IDENTIFIER(NaCl_text_prot): | 63 IDENTIFIER(NaCl_text_prot): |
| 62 » hlt | 64 hlt |
| 65 .globl IDENTIFIER(NaCl_text_prot_end) |
| 66 HIDDEN(NaCl_text_prot_end) |
| 63 IDENTIFIER(NaCl_text_prot_end): | 67 IDENTIFIER(NaCl_text_prot_end): |
| OLD | NEW |