crti.S 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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, write to
  16. the Free Software Foundation, 59 Temple Place - Suite 330,
  17. Boston, MA 02111-1307, USA. */
  18. /* As a special exception, if you link this library with files
  19. compiled with GCC to produce an executable, this does not cause
  20. the resulting executable to be covered by the GNU General Public License.
  21. This exception does not however invalidate any other reasons why
  22. the executable file might be covered by the GNU General Public License. */
  23. /*
  24. * This file just supplies function prologues for the .init and .fini
  25. * sections. It is linked in before crtbegin.o.
  26. */
  27. .file "crti.o"
  28. .ident "GNU C crti.o"
  29. .section .init
  30. .globl __init
  31. .type __init,@function
  32. __init:
  33. #if defined __ID_SHARED_LIB__
  34. [--SP] = P5;
  35. #elif defined __BFIN_FDPIC__
  36. [--SP] = P3;
  37. #endif
  38. LINK 12;
  39. #if defined __ID_SHARED_LIB__
  40. P5 = [P5 + _current_shared_library_p5_offset_]
  41. #endif
  42. .section .fini
  43. .globl __fini
  44. .type __fini,@function
  45. __fini:
  46. #if defined __ID_SHARED_LIB__
  47. [--SP] = P5;
  48. #elif defined __BFIN_FDPIC__
  49. [--SP] = P3;
  50. #endif
  51. LINK 12;
  52. #if defined __ID_SHARED_LIB__
  53. P5 = [P5 + _current_shared_library_p5_offset_]
  54. #endif
  55. .section .note.GNU-stack,"",%progbits