| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 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 | 6 /* |
| 7 * nacl-clang does not use the .init/.fini mechanism at all. |
| 8 */ |
| 9 #if !defined(__clang__) |
| 7 /* | 10 /* |
| 8 * The .init section needs to be finished by a function return. | 11 * The .init section needs to be finished by a function return. |
| 9 */ | 12 */ |
| 10 .section .init | 13 .section .init |
| 11 .p2align NACLENTRYALIGN,0x90 | 14 .p2align NACLENTRYALIGN,0x90 |
| 12 | 15 |
| 13 movq %rbp, %rsp | 16 movq %rbp, %rsp |
| 14 popq %r11 | 17 popq %r11 |
| 15 movl %r11d,%ebp | 18 movl %r11d,%ebp |
| 16 addq %r15,%rbp | 19 addq %r15,%rbp |
| 17 naclret | 20 naclret |
| 18 | 21 |
| 19 .p2align NACLENTRYALIGN,0xf4 | 22 .p2align NACLENTRYALIGN,0xf4 |
| 20 | 23 |
| 21 /* | 24 /* |
| 22 * The .fini section needs to be finished by a function return. | 25 * The .fini section needs to be finished by a function return. |
| 23 */ | 26 */ |
| 24 .section .fini | 27 .section .fini |
| 25 .p2align NACLENTRYALIGN,0x90 | 28 .p2align NACLENTRYALIGN,0x90 |
| 26 | 29 |
| 27 movq %rbp, %rsp | 30 movq %rbp, %rsp |
| 28 popq %r11 | 31 popq %r11 |
| 29 movl %r11d,%ebp | 32 movl %r11d,%ebp |
| 30 addq %r15,%rbp | 33 addq %r15,%rbp |
| 31 naclret | 34 naclret |
| 32 | 35 #endif |
| 33 .p2align NACLENTRYALIGN,0xf4 | 36 .p2align NACLENTRYALIGN,0xf4 |
| OLD | NEW |