xref: /dflybsd-src/contrib/gcc-4.7/gcc/config/initfini-array.h (revision 04febcfb30580676d3e95f58a16c5137ee478b32)
1*e4b17023SJohn Marino /* Definitions for ELF systems with .init_array/.fini_array section
2*e4b17023SJohn Marino    support.
3*e4b17023SJohn Marino    Copyright (C) 2011, 2012
4*e4b17023SJohn Marino    Free Software Foundation, Inc.
5*e4b17023SJohn Marino 
6*e4b17023SJohn Marino    This file is part of GCC.
7*e4b17023SJohn Marino 
8*e4b17023SJohn Marino    GCC is free software; you can redistribute it and/or modify it
9*e4b17023SJohn Marino    under the terms of the GNU General Public License as published
10*e4b17023SJohn Marino    by the Free Software Foundation; either version 3, or (at your
11*e4b17023SJohn Marino    option) any later version.
12*e4b17023SJohn Marino 
13*e4b17023SJohn Marino    GCC is distributed in the hope that it will be useful, but WITHOUT
14*e4b17023SJohn Marino    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15*e4b17023SJohn Marino    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16*e4b17023SJohn Marino    License for more details.
17*e4b17023SJohn Marino 
18*e4b17023SJohn Marino    You should have received a copy of the GNU General Public License
19*e4b17023SJohn Marino    along with GCC; see the file COPYING3.  If not see
20*e4b17023SJohn Marino    <http://www.gnu.org/licenses/>.  */
21*e4b17023SJohn Marino 
22*e4b17023SJohn Marino #ifdef HAVE_INITFINI_ARRAY_SUPPORT
23*e4b17023SJohn Marino 
24*e4b17023SJohn Marino #define USE_INITFINI_ARRAY
25*e4b17023SJohn Marino 
26*e4b17023SJohn Marino #undef INIT_SECTION_ASM_OP
27*e4b17023SJohn Marino #undef FINI_SECTION_ASM_OP
28*e4b17023SJohn Marino 
29*e4b17023SJohn Marino #undef INIT_ARRAY_SECTION_ASM_OP
30*e4b17023SJohn Marino #define INIT_ARRAY_SECTION_ASM_OP
31*e4b17023SJohn Marino 
32*e4b17023SJohn Marino #undef FINI_ARRAY_SECTION_ASM_OP
33*e4b17023SJohn Marino #define FINI_ARRAY_SECTION_ASM_OP
34*e4b17023SJohn Marino 
35*e4b17023SJohn Marino /* Use .init_array/.fini_array section for constructors and destructors. */
36*e4b17023SJohn Marino #undef TARGET_ASM_CONSTRUCTOR
37*e4b17023SJohn Marino #define TARGET_ASM_CONSTRUCTOR default_elf_init_array_asm_out_constructor
38*e4b17023SJohn Marino #undef TARGET_ASM_DESTRUCTOR
39*e4b17023SJohn Marino #define TARGET_ASM_DESTRUCTOR default_elf_fini_array_asm_out_destructor
40*e4b17023SJohn Marino 
41*e4b17023SJohn Marino #endif
42