| Index: src/untrusted/stubs/crti_x86_64.S
|
| diff --git a/src/untrusted/stubs/crti_x86_64.S b/src/untrusted/stubs/crti_x86_64.S
|
| index fa93b737ee9ab08a26f885159536ea320079fc94..704c67534225a601e4c171d41a8355e62e576ed8 100644
|
| --- a/src/untrusted/stubs/crti_x86_64.S
|
| +++ b/src/untrusted/stubs/crti_x86_64.S
|
| @@ -4,6 +4,7 @@
|
| * 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
|
| @@ -32,7 +33,23 @@ _init:
|
| _fini:
|
| pushq %rbp
|
| movq %rsp, %rbp
|
| +#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.
|
|
|