On Fri, Feb 17, 2012 at 2:51 PM, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: > >> Richard Guenther <richard.guent...@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 <r...@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 >