initfini-array.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* Definitions for ELF systems with .init_array/.fini_array section
  2. support.
  3. Copyright (C) 2011-2015 Free Software Foundation, Inc.
  4. This file is part of GCC.
  5. GCC is free software; you can redistribute it and/or modify it
  6. under the terms of the GNU General Public License as published
  7. by the Free Software Foundation; either version 3, or (at your
  8. option) any 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. #ifdef HAVE_INITFINI_ARRAY_SUPPORT
  21. #define USE_INITFINI_ARRAY
  22. #undef INIT_SECTION_ASM_OP
  23. #undef FINI_SECTION_ASM_OP
  24. #undef INIT_ARRAY_SECTION_ASM_OP
  25. #define INIT_ARRAY_SECTION_ASM_OP
  26. #undef FINI_ARRAY_SECTION_ASM_OP
  27. #define FINI_ARRAY_SECTION_ASM_OP
  28. /* Use .init_array/.fini_array section for constructors and destructors. */
  29. #undef TARGET_ASM_CONSTRUCTOR
  30. #define TARGET_ASM_CONSTRUCTOR default_elf_init_array_asm_out_constructor
  31. #undef TARGET_ASM_DESTRUCTOR
  32. #define TARGET_ASM_DESTRUCTOR default_elf_fini_array_asm_out_destructor
  33. #endif