| Index: src/untrusted/stubs/crti_x86_32.S
|
| diff --git a/src/untrusted/stubs/crti_x86_32.S b/src/untrusted/stubs/crti_x86_32.S
|
| index 6da80f4158cc281a2ef56e70dd7f3a0feb778135..e9aab85c429ad022a7718dc4f4812deedfbd6055 100644
|
| --- a/src/untrusted/stubs/crti_x86_32.S
|
| +++ b/src/untrusted/stubs/crti_x86_32.S
|
| @@ -3,7 +3,7 @@
|
| * Use of this source code is governed by a BSD-style license that can be
|
| * found in the LICENSE file.
|
| */
|
| -
|
| +#if !defined(__clang__)
|
| /*
|
| * The .init section contains one symbol, _init, which is the entry
|
| * of a function and hence needs to be aligned in accordance with
|
| @@ -33,7 +33,23 @@ _init:
|
| _fini:
|
| pushl %ebp
|
| movl %esp, %ebp
|
| +#else
|
| + /*
|
| + * nacl-clang does not use the .init/.fini mechanism at all, but newlib
|
| + * still calls _init and _fini, so define them as empty functions in the
|
| + * text section.
|
| + */
|
| + .section .text
|
| + .p2align NACLENTRYALIGN
|
| + .global _init
|
| +_init:
|
| + naclret
|
|
|
| + .p2align NACLENTRYALIGN
|
| + .global _fini
|
| +_fini:
|
| + naclret
|
| +#endif
|
| /*
|
| * The code that follows will be appended by the linker, and will not
|
| * be aligned individually, so we need to align it.
|
|
|