eabi-ci.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* crti.s for eabi
  2. Copyright (C) 1996-2022 Free Software Foundation, Inc.
  3. Written By Michael Meissner
  4. This file is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by the
  6. Free Software Foundation; either version 3, or (at your option) any
  7. later version.
  8. This file is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. Under Section 7 of GPL version 3, you are granted additional
  13. permissions described in the GCC Runtime Library Exception, version
  14. 3.1, as published by the Free Software Foundation.
  15. You should have received a copy of the GNU General Public License and
  16. a copy of the GCC Runtime Library Exception along with this program;
  17. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  18. <http://www.gnu.org/licenses/>. */
  19. /* This file just supplies labeled starting points for the .got* and other
  20. special sections. It is linked in first before other modules. */
  21. .ident "GNU C crti.s"
  22. #include <ppc-asm.h>
  23. #ifndef __powerpc64__
  24. .section ".got","aw"
  25. .globl __GOT_START__
  26. .type __GOT_START__,@object
  27. __GOT_START__:
  28. .section ".got1","aw"
  29. .globl __GOT1_START__
  30. .type __GOT1_START__,@object
  31. __GOT1_START__:
  32. .section ".got2","aw"
  33. .globl __GOT2_START__
  34. .type __GOT2_START__,@object
  35. __GOT2_START__:
  36. .section ".fixup","aw"
  37. .globl __FIXUP_START__
  38. .type __FIXUP_START__,@object
  39. __FIXUP_START__:
  40. .section ".ctors","aw"
  41. .globl __CTOR_LIST__
  42. .type __CTOR_LIST__,@object
  43. __CTOR_LIST__:
  44. .section ".dtors","aw"
  45. .globl __DTOR_LIST__
  46. .type __DTOR_LIST__,@object
  47. __DTOR_LIST__:
  48. .section ".sdata","aw"
  49. .globl __SDATA_START__
  50. .type __SDATA_START__,@object
  51. .weak _SDA_BASE_
  52. .type _SDA_BASE_,@object
  53. __SDATA_START__:
  54. _SDA_BASE_:
  55. .section ".sbss","aw",@nobits
  56. .globl __SBSS_START__
  57. .type __SBSS_START__,@object
  58. __SBSS_START__:
  59. .section ".sdata2","a"
  60. .weak _SDA2_BASE_
  61. .type _SDA2_BASE_,@object
  62. .globl __SDATA2_START__
  63. .type __SDATA2_START__,@object
  64. __SDATA2_START__:
  65. _SDA2_BASE_:
  66. .section ".sbss2","a"
  67. .globl __SBSS2_START__
  68. .type __SBSS2_START__,@object
  69. __SBSS2_START__:
  70. .section ".gcc_except_table","aw"
  71. .globl __EXCEPT_START__
  72. .type __EXCEPT_START__,@object
  73. __EXCEPT_START__:
  74. .section ".eh_frame","aw"
  75. .globl __EH_FRAME_BEGIN__
  76. .type __EH_FRAME_BEGIN__,@object
  77. __EH_FRAME_BEGIN__:
  78. /* Head of __init function used for static constructors. */
  79. .section ".init","ax"
  80. .align 2
  81. FUNC_START(__init)
  82. stwu 1,-16(1)
  83. mflr 0
  84. stw 0,20(1)
  85. /* Head of __fini function used for static destructors. */
  86. .section ".fini","ax"
  87. .align 2
  88. FUNC_START(__fini)
  89. stwu 1,-16(1)
  90. mflr 0
  91. stw 0,20(1)
  92. #endif