This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING: PATCH: PR target/46770: Use .init_array/.fini_array sections


On Mon, Mar 19, 2012 at 1:34 PM, DJ Delorie <dj@redhat.com> wrote:
>
> This breaks constructors on pretty much every elf+newlib target,
> because newlib and gcc both use HAVE_INITFINI_ARRAY (and have for many
> years) but the tests don't match. ÂGCC puts ctors in .ctors but libgcc
> is built without support for them (newlib's generated config headers
> define HAVE_INITFINI_ARRAY, which causes gcc's initini-array.h to set
> USE_INITFINI_ARRAY, which shuts off libgcc's ctor/dtor support), so
> they don't run.

This should have been fixed by:
2012-02-23  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

        * acinclude.m4: Use HAVE_INITFINI_ARRAY_SUPPORT instead of
        HAVE_INITFINI_ARRAY to work around namespace pollution in
        certain versions of newlib system headers.
        * config.in: Regenerate.
        * configure: Regenerate.
        * config/initfini-array.h: Use HAVE_INITFINI_ARRAY_SUPPORT
        instead of HAVE_INITFINI_ARRAY.

Thanks,
Andrew Pinski


>
>> 2011-08-20 ÂH.J. Lu Â<hongjiu.lu@intel.com>
>>
>> Â Â Â PR target/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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]