This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: Paolo Bonzini <bonzini at gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Feb 2012 11:02:50 +0100
- Subject: Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)
- Authentication-results: mr.google.com; spf=pass (google.com: domain of richard.guenther@gmail.com designates 10.50.216.231 as permitted sender) smtp.mail=richard.guenther@gmail.com; dkim=pass header.i=richard.guenther@gmail.com
- References: <20120118232441.GO18768@tyan-ft48-01.lab.bos.redhat.com> <ydd62ftxhih.fsf@manam.CeBiTec.Uni-Bielefeld.DE> <4F26CBFD.7060608@gnu.org> <yddwr7ouipv.fsf@manam.CeBiTec.Uni-Bielefeld.DE> <CAFiYyc0FsVs_xoW4ydM-J0sD_LL7yzJ-vN9tccx6b-WJ+e3cFw@mail.gmail.com> <yddwr7mplgr.fsf@manam.CeBiTec.Uni-Bielefeld.DE> <yddsji9o9e5.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
On Fri, Feb 17, 2012 at 2:51 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>
>> Richard Guenther <richard.guenther@gmail.com> writes:
>>
>>> I'm not sure about the varasm.c change - it's definitely not a no-op
>>> (callback will be not set, and the flags will be different). ?Certainly
>>
>> As I've demonstrated in my response to H.J., the effect with gas is none.
>>
>>> the current code is inconsistent wrt the priority != DEFAULT_INIT_PRIORITY
>>> case, not sure why, but you don't make it consistent either because
>>> you don't change that case to SECTION_NOTYPE either. ?I'd be fine
>>
>> I didn't find a need for that, but agree that the inconsistency is
>> disturbing. ?default_section_type_flags suggests that SECTION_NOTYPE
>> should be set for .init_array and friends, but it's only used by
>> get_named_section.
>>
>>> with it with both calls using SECTION_NOTYPE, but would like to
>>> know what the callback difference is about.
>>
>> I don't think the callback is needed, which is effectively a
>>
>> ? ? ? printf ("\t.section\t.init_array");
>>
>> Looking at it, this is e.g. wrong for Sun as on SPARC, which requires
>> the section name to be in double quotes.
>
> Here's the revised patch which consistently sets SECTION_NOTYPE.
>
> Bootstrapped without regressions on i386-pc-solaris2.11 with gas/gld and
> x86_64-unknown-linux-gnu, ok for mainline?
Ok.
Thanks,
Richard.
> ? ? ? ?Rainer
>
>
> 2012-01-20 ?Rainer Orth ?<ro@CeBiTec.Uni-Bielefeld.DE>
>
> ? ? ? ?PR target/50166
> ? ? ? ?* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Require gcc_SUN_LD_VERSION.
> ? ? ? ?Define _start.
> ? ? ? ?Remove -e 0 from $gcc_cv_ld invocation.
> ? ? ? ?Only use __GLIBC_PREREQ if defined.
> ? ? ? ?Enable on Solaris since Solaris 8 patch.
> ? ? ? ?(gcc_SUN_LD_VERSION): New macro.
> ? ? ? ?* configure.ac (ld_ver) <*-*-solaris2*>: Refer to
> ? ? ? ?gcc_SUN_LD_VERSION for version number format.
> ? ? ? ?* configure: Regenerate.
> ? ? ? ?* varasm.c (get_elf_initfini_array_priority_section): Set
> ? ? ? ?SECTION_NOTYPE for non-default priority.
> ? ? ? ?Use get_section instead of get_unnamed_section to emit
> ? ? ? ?.init_array/.fini_array with default priority.
>
>
>
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>