OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Native Client Authors. All rights reserved. | 2 * Copyright 2012 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 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h
" | 6 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h
" |
7 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 7 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
8 | 8 |
9 #if defined(PNACL_AS) | 9 #if defined(PNACL_AS) |
10 #define call naclcall | 10 #define call naclcall |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 pushl $end_of_text | 132 pushl $end_of_text |
133 pushl $1 | 133 pushl $1 |
134 call write_num_16 | 134 call write_num_16 |
135 addl $8, %esp | 135 addl $8, %esp |
136 pushl $'\n' | 136 pushl $'\n' |
137 pushl $1 | 137 pushl $1 |
138 call write_char | 138 call write_char |
139 addl $8, %esp | 139 addl $8, %esp |
140 | 140 |
141 pushl $0 | 141 pushl $0 |
142 call NACL_SYSCALL_ADDR(NACL_sys_sysbrk) | 142 call NACL_SYSCALL_ADDR(NACL_sys_brk) |
143 addl $4, %esp | 143 addl $4, %esp |
144 | 144 |
145 xorl %edi, %edi /* edi holds our eventual exit status */ | 145 xorl %edi, %edi /* edi holds our eventual exit status */ |
146 cmpl $EXPECTED_BREAK, %eax | 146 cmpl $EXPECTED_BREAK, %eax |
147 je brk_sane | 147 je brk_sane |
148 movl $1, %edi | 148 movl $1, %edi |
149 brk_sane: | 149 brk_sane: |
150 | 150 |
151 pushl %eax | 151 pushl %eax |
152 pushl $1 | 152 pushl $1 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 #else | 217 #else |
218 .skip TEXT_EXTEND - (. - start_of_text), 0xf4 | 218 .skip TEXT_EXTEND - (. - start_of_text), 0xf4 |
219 #endif | 219 #endif |
220 end_of_text: | 220 end_of_text: |
221 | 221 |
222 #if defined(EXPECTED_RODATA) | 222 #if defined(EXPECTED_RODATA) |
223 .section .rodata | 223 .section .rodata |
224 ro_str: .ascii "Hello world\n" | 224 ro_str: .ascii "Hello world\n" |
225 /* 123456789012 */ | 225 /* 123456789012 */ |
226 #endif | 226 #endif |
OLD | NEW |