This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/46770] Replace .ctors/.dtors with .init_array/.fini_array on targets supporting them
- From: "hjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Aug 2011 20:02:21 +0000
- Subject: [Bug target/46770] Replace .ctors/.dtors with .init_array/.fini_array on targets supporting them
- Auto-submitted: auto-generated
- References: <bug-46770-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
--- Comment #69 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-08-20 20:02:21 UTC ---
Author: hjl
Date: Sat Aug 20 20:02:17 2011
New Revision: 177933
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177933
Log:
Use .init_arrary/.fini_array sections if possible.
2011-08-20 H.J. Lu <hongjiu.lu@intel.com>
PR other/46770
* config.gcc (tm_file): Add initfini-array.h if
.init_arrary/.fini_array are supported.
* crtstuff.c: Don't generate .ctors nor .dtors sections if
USE_INITFINI_ARRAY is defined.
* output.h (default_elf_init_array_asm_out_constructor): New.
(default_elf_fini_array_asm_out_destructor): Likewise.
* varasm.c (elf_init_array_section): Likewise.
(elf_fini_array_section): Likewise.
(get_elf_initfini_array_priority_section): Likewise.
(default_elf_init_array_asm_out_constructor): Likewise.
(default_elf_fini_array_asm_out_destructor): Likewise.
* config/initfini-array.h: New.
Added:
trunk/gcc/config/initfini-array.h
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc
trunk/gcc/crtstuff.c
trunk/gcc/output.h
trunk/gcc/varasm.c