crtn.S 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* crtn.s for __init, __fini
  2. This file supplies the epilogue for __init and __fini routines
  3. Copyright (C) 2009-2022 Free Software Foundation, Inc.
  4. Contributed by Michael Eager <eager@eagercon.com>.
  5. This file is free software; you can redistribute it and/or modify it
  6. under the terms of the GNU General Public License as published by the
  7. Free Software Foundation; either version 3, or (at your option) any
  8. later version.
  9. GCC is distributed in the hope that it will be useful, but WITHOUT
  10. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  12. License for more details.
  13. Under Section 7 of GPL version 3, you are granted additional
  14. permissions described in the GCC Runtime Library Exception, version
  15. 3.1, as published by the Free Software Foundation.
  16. You should have received a copy of the GNU General Public License and
  17. a copy of the GCC Runtime Library Exception along with this program;
  18. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. <http://www.gnu.org/licenses/>. */
  20. /* An executable stack is *not* required for these functions. */
  21. #ifdef __linux__
  22. .section .note.GNU-stack,"",%progbits
  23. .previous
  24. #endif
  25. .section .init, "ax"
  26. lw r15, r0, r1
  27. rtsd r15, 8
  28. addik r1, r1, 8
  29. .section .fini, "ax"
  30. lw r15, r0, r1
  31. rtsd r15, 8
  32. addik r1, r1, 8