1 1.1 mrg # End of .init and .fini sections. 2 1.1.1.11 mrg # Copyright (C) 2003-2024 Free Software Foundation, Inc. 3 1.1 mrg # 4 1.1 mrg # This file is free software; you can redistribute it and/or modify it 5 1.1 mrg # under the terms of the GNU General Public License as published by 6 1.1 mrg # the Free Software Foundation; either version 3, or (at your option) 7 1.1 mrg # any later version. 8 1.1 mrg # 9 1.1 mrg # GCC is distributed in the hope that it will be useful, but WITHOUT ANY 10 1.1 mrg # WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 1.1 mrg # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 1.1 mrg # for more details. 13 1.1 mrg # 14 1.1 mrg # Under Section 7 of GPL version 3, you are granted additional 15 1.1 mrg # permissions described in the GCC Runtime Library Exception, version 16 1.1 mrg # 3.1, as published by the Free Software Foundation. 17 1.1 mrg # 18 1.1 mrg # You should have received a copy of the GNU General Public License and 19 1.1 mrg # a copy of the GCC Runtime Library Exception along with this program; 20 1.1 mrg # see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 21 1.1 mrg # <http://www.gnu.org/licenses/>. 22 1.1 mrg 23 1.1 mrg 24 1.1 mrg # This file just makes sure that the .fini and .init sections do in 25 1.1 mrg # fact return. Users may put any desired instructions in those sections. 26 1.1 mrg # This file is the last thing linked into any executable. 27 1.1 mrg 28 1.1.1.11 mrg #include "xtensa-config-builtin.h" 29 1.1.1.11 mrg 30 1.1.1.11 mrg /* An executable stack is *not* required for these functions. */ 31 1.1.1.11 mrg #if defined(__ELF__) && defined(__linux__) 32 1.1.1.11 mrg .section .note.GNU-stack,"",%progbits 33 1.1.1.11 mrg .previous 34 1.1.1.11 mrg #endif 35 1.1 mrg 36 1.1 mrg .section .init 37 1.1 mrg #if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__ 38 1.1 mrg retw 39 1.1 mrg #else 40 1.1 mrg l32i a0, sp, 0 41 1.1 mrg addi sp, sp, 32 42 1.1 mrg ret 43 1.1 mrg #endif 44 1.1 mrg 45 1.1 mrg .section .fini 46 1.1 mrg #if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__ 47 1.1 mrg retw 48 1.1 mrg #else 49 1.1 mrg l32i a0, sp, 0 50 1.1 mrg addi sp, sp, 32 51 1.1 mrg ret 52 1.1 mrg #endif 53