fstatat: add wrapper that uses statx for non-legacy arch
[uclibc-ng.git] / libc / sysdeps / linux / tile / crti.S
blobe355cca29012c1d4d7633fba8ec6455d324866bc
1 /* Special .init and .fini section support for tile.
2    Copyright (C) 2012-2018 Free Software Foundation, Inc.
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
9    In addition to the permissions in the GNU Lesser General Public
10    License, the Free Software Foundation gives you unlimited
11    permission to link the compiled version of this file with other
12    programs, and to distribute those programs without any restriction
13    coming from the use of this file. (The GNU Lesser General Public
14    License restrictions do apply in other respects; for example, they
15    cover modification of the file, and distribution when not linked
16    into another program.)
18    Note that people who make modified versions of this file are not
19    obligated to grant this special exception for their modified
20    versions; it is their choice whether to do so. The GNU Lesser
21    General Public License gives permission to release a modified
22    version without this exception; this exception also makes it
23    possible to release a modified version which carries forward this
24    exception.
26    The GNU C Library is distributed in the hope that it will be useful,
27    but WITHOUT ANY WARRANTY; without even the implied warranty of
28    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29    Lesser General Public License for more details.
31    You should have received a copy of the GNU Lesser General Public
32    License along with the GNU C Library; if not, see
33    <http://www.gnu.org/licenses/>.  */
35 /* crti.S puts a function prologue at the beginning of the .init and
36    .fini sections and defines global symbols for those addresses, so
37    they can be called as functions.  The symbols _init and _fini are
38    magic and cause the linker to emit DT_INIT and DT_FINI.  */
40 #include <sysdep.h>
43         .section .init,"ax",@progbits
44         .align 8
45         .globl _init
46         .type _init, @function
47 _init:
48         {
49          move r29, sp
50          ADDI_PTR r28, sp, -REGSIZE
51          st sp, lr
52         }
53         ADDI_PTR sp, sp, -(2 * REGSIZE)
54         st r28, r29
55 .Lno_weak_fn:
57         .section .fini,"ax",@progbits
58         .align 8
59         .globl _fini
60         .type _fini, @function
61 _fini:
62         {
63          move r29, sp
64          ADDI_PTR r28, sp, -REGSIZE
65          st sp, lr
66         }
67         ADDI_PTR sp, sp, -(2 * REGSIZE)
68         st r28, r29