crti.S 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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) 1999 Free Software Foundation, Inc.
  4. Contributed by Charles-Antoine Gauthier (charles.gauthier@iit.nrc.ca).
  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 2, 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. You should have received a copy of the GNU General Public License
  15. along with GCC; see the file COPYING. If not, see
  16. <http://www.gnu.org/licenses/>. */
  17. /* As a special exception, if you link this library with files
  18. compiled with GCC to produce an executable, this does not cause
  19. the resulting executable to be covered by the GNU General Public License.
  20. This exception does not however invalidate any other reasons why
  21. the executable file might be covered by the GNU General Public License. */
  22. /*
  23. * This file just supplies function prologues for the .init and .fini
  24. * sections. It is linked in before crtbegin.o.
  25. */
  26. .file "crti.o"
  27. .ident "GNU C crti.o"
  28. .section .init
  29. .globl __init
  30. .type __init,@function
  31. __init:
  32. #if defined __ID_SHARED_LIB__
  33. [--SP] = P5;
  34. #elif defined __BFIN_FDPIC__
  35. [--SP] = P3;
  36. #endif
  37. LINK 12;
  38. #if defined __ID_SHARED_LIB__
  39. P5 = [P5 + _current_shared_library_p5_offset_]
  40. #endif
  41. .section .fini
  42. .globl __fini
  43. .type __fini,@function
  44. __fini:
  45. #if defined __ID_SHARED_LIB__
  46. [--SP] = P5;
  47. #elif defined __BFIN_FDPIC__
  48. [--SP] = P3;
  49. #endif
  50. LINK 12;
  51. #if defined __ID_SHARED_LIB__
  52. P5 = [P5 + _current_shared_library_p5_offset_]
  53. #endif
  54. .section .note.GNU-stack,"",%progbits