crti.S 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Specialized code needed to support construction and destruction of
  2. file-scope objects in C++ and Java code, and to support exception handling.
  3. Copyright (C) 2005-2022 Free Software Foundation, Inc.
  4. Contributed by Analog Devices.
  5. This file is part of GCC.
  6. GCC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 3, or (at your option)
  9. any later version.
  10. GCC is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. Under Section 7 of GPL version 3, you are granted additional
  15. permissions described in the GCC Runtime Library Exception, version
  16. 3.1, as published by the Free Software Foundation.
  17. You should have received a copy of the GNU General Public License and
  18. a copy of the GCC Runtime Library Exception along with this program;
  19. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  20. <http://www.gnu.org/licenses/>. */
  21. /*
  22. * This file just supplies function prologues for the .init and .fini
  23. * sections. It is linked in before crtbegin.o.
  24. */
  25. .ident "GNU C crti.o"
  26. .section .init
  27. .globl __init
  28. .type __init,@function
  29. __init:
  30. #if defined __ID_SHARED_LIB__
  31. [--SP] = P5;
  32. #elif defined __BFIN_FDPIC__
  33. [--SP] = P3;
  34. #endif
  35. LINK 12;
  36. #if defined __ID_SHARED_LIB__
  37. P5 = [P5 + _current_shared_library_p5_offset_]
  38. #endif
  39. .section .fini
  40. .globl __fini
  41. .type __fini,@function
  42. __fini:
  43. #if defined __ID_SHARED_LIB__
  44. [--SP] = P5;
  45. #elif defined __BFIN_FDPIC__
  46. [--SP] = P3;
  47. #endif
  48. LINK 12;
  49. #if defined __ID_SHARED_LIB__
  50. P5 = [P5 + _current_shared_library_p5_offset_]
  51. #endif