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

2012-03-19 Thread DJ Delorie
Sweet! Thanks! We hadn't merged that bit into our tree yet...

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

2012-03-19 Thread Andrew Pinski
On Mon, Mar 19, 2012 at 1:34 PM, DJ Delorie 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 t

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

2012-03-19 Thread DJ Delorie
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_A

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

2011-08-22 Thread H.J. Lu
On Mon, Aug 22, 2011 at 11:59 AM, Joseph S. Myers wrote: > On Mon, 22 Aug 2011, H.J. Lu wrote: > >> > Require a good assembler on ELF targets and just enable this by default >> > for them without trying a configure test that won't work for cross >> > compilation (AC_RUN_IFELSE is bad). >> > >> > T

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

2011-08-22 Thread Joseph S. Myers
On Mon, 22 Aug 2011, H.J. Lu wrote: > > Require a good assembler on ELF targets and just enable this by default > > for them without trying a configure test that won't work for cross > > compilation (AC_RUN_IFELSE is bad). > > > > The toplevel config/elf.m4 provides a good notion of what is or is

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

2011-08-22 Thread H.J. Lu
On Mon, Aug 22, 2011 at 11:53 AM, Joseph S. Myers wrote: > On Mon, 22 Aug 2011, H.J. Lu wrote: > >> On Sun, Aug 21, 2011 at 10:37 PM, Jakub Jelinek wrote: >> nd/or add another test to it that tests >> > that you can actually use >> > .section .init_array >> > and it will use correct section flags

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

2011-08-22 Thread Joseph S. Myers
On Mon, 22 Aug 2011, H.J. Lu wrote: > On Sun, Aug 21, 2011 at 10:37 PM, Jakub Jelinek wrote: > nd/or add another test to it that tests > > that you can actually use > > .section .init_array > > and it will use correct section flags for the section. > > > > We need this information in config.gcc.

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

2011-08-22 Thread H.J. Lu
On Mon, Aug 22, 2011 at 10:09 AM, H.J. Lu wrote: > On Sun, Aug 21, 2011 at 10:37 PM, Jakub Jelinek wrote: > nd/or add another test to it that tests >> that you can actually use >> .section .init_array >> and it will use correct section flags for the section. >> > > We need this information in con

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

2011-08-22 Thread H.J. Lu
On Sun, Aug 21, 2011 at 10:37 PM, Jakub Jelinek wrote: nd/or add another test to it that tests > that you can actually use > .section .init_array > and it will use correct section flags for the section. > We need this information in config.gcc. But config.gcc is used before assembler and readelf

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

2011-08-22 Thread H.J. Lu
On Sun, Aug 21, 2011 at 4:19 PM, David Edelsohn wrote: > This patch broke bootstrap on AIX.  It emits a ".section" op in > assembly but ".section" is an ELF syntax op not AIX XCOFF. > > FE..initialize_critical: >        .section        .init_array > > varasm.c should not be generating ELF ops for

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

2011-08-22 Thread Paolo Bonzini
On 08/22/2011 04:45 PM, H.J. Lu wrote: Can I check in this patch to address AIX issue first? I will submit a patch to test ".section .init_array" later? Thanks. Yes. Paolo

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

2011-08-22 Thread H.J. Lu
On Mon, Aug 22, 2011 at 7:06 AM, H.J. Lu wrote: > On Sun, Aug 21, 2011 at 10:37 PM, Jakub Jelinek wrote: >> On Sun, Aug 21, 2011 at 05:09:59PM -0700, H.J. Lu wrote: >>> I didn't know .init_array section was enabled for AIX.  Does this patch >>> work for you? >> >> Some ELF targets (e.g. arm*-linu

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

2011-08-22 Thread H.J. Lu
On Sun, Aug 21, 2011 at 10:37 PM, Jakub Jelinek wrote: > On Sun, Aug 21, 2011 at 05:09:59PM -0700, H.J. Lu wrote: >> I didn't know .init_array section was enabled for AIX.  Does this patch >> work for you? > > Some ELF targets (e.g. arm*-linux*) don't use elfos.h.  IMHO you should > instead add >

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

2011-08-21 Thread Jakub Jelinek
On Sun, Aug 21, 2011 at 05:09:59PM -0700, H.J. Lu wrote: > I didn't know .init_array section was enabled for AIX. Does this patch > work for you? Some ELF targets (e.g. arm*-linux*) don't use elfos.h. IMHO you should instead add #ifndef __ELF__ #error NonELF #endif to gcc_AC_INITFINI_ARRAY test.

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

2011-08-21 Thread David Edelsohn
On Sun, Aug 21, 2011 at 8:09 PM, H.J. Lu wrote: > I didn't know .init_array section was enabled for AIX.  Does this patch > work for you? > > Sorry about the breakage. I am not exactly sure why .init_array sections are enabled for AIX. The configure test succeeds. Is the problem with the config

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

2011-08-21 Thread H.J. Lu
On Sun, Aug 21, 2011 at 4:19 PM, David Edelsohn wrote: > This patch broke bootstrap on AIX.  It emits a ".section" op in > assembly but ".section" is an ELF syntax op not AIX XCOFF. > > FE..initialize_critical: >        .section        .init_array > > varasm.c should not be generating ELF ops for

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

2011-08-21 Thread David Edelsohn
This patch broke bootstrap on AIX. It emits a ".section" op in assembly but ".section" is an ELF syntax op not AIX XCOFF. FE..initialize_critical: .section.init_array varasm.c should not be generating ELF ops for non-ELF targets. config.log shows: gcc_cv_initfini_array=yes tm_f

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

2011-08-20 Thread H.J. Lu
On Fri, Aug 19, 2011 at 7:55 AM, Jakub Jelinek wrote: > On Fri, Aug 19, 2011 at 07:47:40AM -0700, H.J. Lu wrote: >> 2011-08-19  H.J. Lu   >> >>       PR target/46770 >>       * config.gcc (tm_file): Add initfini-array.h if >>       .init_arary/.fini_array supported. > > s/arary/array/ > > Ok if no

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

2011-08-19 Thread Jakub Jelinek
On Fri, Aug 19, 2011 at 07:47:40AM -0700, H.J. Lu wrote: > 2011-08-19 H.J. Lu > > PR target/46770 > * config.gcc (tm_file): Add initfini-array.h if > .init_arary/.fini_array supported. s/arary/array/ Ok if nobody objects within 24 hours, but please watch for any fallouts.

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

2011-08-19 Thread H.J. Lu
On Fri, Aug 19, 2011 at 1:17 AM, Jakub Jelinek wrote: > Sorry for the delay. > >> --- a/gcc/config.gcc >> +++ b/gcc/config.gcc >> @@ -186,6 +186,9 @@ >>  #  configure_default_options >>  #                    Set to an initializer for configure_default_options >>  #                    in configargs

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

2011-08-19 Thread Jakub Jelinek
Sorry for the delay. > --- a/gcc/config.gcc > +++ b/gcc/config.gcc > @@ -186,6 +186,9 @@ > # configure_default_options > #Set to an initializer for configure_default_options > #in configargs.h, based on --with-cpu et cetera. > +# > +# use_initfini_array

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

2011-08-14 Thread H.J. Lu
PING On Tue, Aug 9, 2011 at 6:56 AM, H.J. Lu wrote: > PING. > > On Sat, Aug 6, 2011 at 7:40 AM, H.J. Lu wrote: >> PING. >> >> On Fri, Jul 22, 2011 at 7:06 AM, H.J. Lu wrote: >>> On Fri, Jul 22, 2011 at 7:00 AM, H.J. Lu wrote: On Fri, Jul 22, 2011 at 6:03 AM, H.J. Lu wrote: > On Fri,

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

2011-08-09 Thread H.J. Lu
PING. On Sat, Aug 6, 2011 at 7:40 AM, H.J. Lu wrote: > PING. > > On Fri, Jul 22, 2011 at 7:06 AM, H.J. Lu wrote: >> On Fri, Jul 22, 2011 at 7:00 AM, H.J. Lu wrote: >>> On Fri, Jul 22, 2011 at 6:03 AM, H.J. Lu wrote: On Fri, Jul 22, 2011 at 5:30 AM, Jakub Jelinek wrote: > On Fri, Jul

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

2011-08-06 Thread H.J. Lu
PING. On Fri, Jul 22, 2011 at 7:06 AM, H.J. Lu wrote: > On Fri, Jul 22, 2011 at 7:00 AM, H.J. Lu wrote: >> On Fri, Jul 22, 2011 at 6:03 AM, H.J. Lu wrote: >>> On Fri, Jul 22, 2011 at 5:30 AM, Jakub Jelinek wrote: On Fri, Jul 22, 2011 at 04:59:28AM -0700, H.J. Lu wrote: > @@ -2660,6 +2

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

2011-07-22 Thread H.J. Lu
On Fri, Jul 22, 2011 at 7:00 AM, H.J. Lu wrote: > On Fri, Jul 22, 2011 at 6:03 AM, H.J. Lu wrote: >> On Fri, Jul 22, 2011 at 5:30 AM, Jakub Jelinek wrote: >>> On Fri, Jul 22, 2011 at 04:59:28AM -0700, H.J. Lu wrote: @@ -2660,6 +2664,7 @@ esac  case ${target} in  i[34567]86-*-linux

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

2011-07-22 Thread H.J. Lu
On Fri, Jul 22, 2011 at 6:03 AM, H.J. Lu wrote: > On Fri, Jul 22, 2011 at 5:30 AM, Jakub Jelinek wrote: >> On Fri, Jul 22, 2011 at 04:59:28AM -0700, H.J. Lu wrote: >>> @@ -2660,6 +2664,7 @@ esac >>>  case ${target} in >>>  i[34567]86-*-linux* | x86_64-*-linux*) >>>       tmake_file="${tmake_file}

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

2011-07-22 Thread H.J. Lu
On Fri, Jul 22, 2011 at 5:30 AM, Jakub Jelinek wrote: > On Fri, Jul 22, 2011 at 04:59:28AM -0700, H.J. Lu wrote: >> @@ -2660,6 +2664,7 @@ esac >>  case ${target} in >>  i[34567]86-*-linux* | x86_64-*-linux*) >>       tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386" >> +     use_initfini_ar

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

2011-07-22 Thread Joseph S. Myers
On Fri, 22 Jul 2011, Jakub Jelinek wrote: > On Fri, Jul 22, 2011 at 04:59:28AM -0700, H.J. Lu wrote: > > @@ -2660,6 +2664,7 @@ esac > > case ${target} in > > i[34567]86-*-linux* | x86_64-*-linux*) > > tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386" > > + use_initfini_array=yes > >

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

2011-07-22 Thread Rainer Orth
H.J. > Most of this change isn't related to libgcc, except for crtstuff.c. You > just need to find a way to define NO_CTORS_DTORS_SECTIONS > in libgcc when .init_array is used. sorry, I misread: initfini-array.o goes into extra_objs, not extra_parts. Rainer --

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

2011-07-22 Thread Jakub Jelinek
On Fri, Jul 22, 2011 at 04:59:28AM -0700, H.J. Lu wrote: > @@ -2660,6 +2664,7 @@ esac > case ${target} in > i[34567]86-*-linux* | x86_64-*-linux*) > tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386" > + use_initfini_array=yes > ;; > i[34567]86-*-* | x86_64-*-*) > tma

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

2011-07-22 Thread H.J. Lu
On Fri, Jul 22, 2011 at 5:22 AM, Rainer Orth wrote: > H.J., > >> Can you review this change? > > as you know, I'm currently working to move all libgcc-related stuff over > to toplevel libgcc.  Can you please move all but the crtstuff.c part of > this patch over to libgcc instead? > > I've got a pa

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

2011-07-22 Thread Rainer Orth
H.J., > Can you review this change? as you know, I'm currently working to move all libgcc-related stuff over to toplevel libgcc. Can you please move all but the crtstuff.c part of this patch over to libgcc instead? I've got a patch almost ready to move crtstuff.c and other crt files, and would

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

2011-07-22 Thread H.J. Lu
On Sun, Jun 19, 2011 at 1:01 PM, Uros Bizjak wrote: > On Sun, Jun 19, 2011 at 8:39 PM, H.J. Lu wrote: > I can't approve the configury changes and would like to defer to target maintainers for the target specific changes.  That said, I'm not familiar enough with the area of the patc

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

2011-07-01 Thread H.J. Lu
On Sun, Jun 19, 2011 at 11:39 AM, H.J. Lu wrote: > On Fri, Jun 3, 2011 at 5:51 AM, H.J. Lu wrote: >> On Fri, Jun 3, 2011 at 5:31 AM, Richard Guenther >> wrote: >>> On Fri, Jun 3, 2011 at 6:31 AM, H.J. Lu wrote: On Wed, May 18, 2011 at 8:57 AM, H.J. Lu wrote: > On Tue, Apr 26, 2011 at

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

2011-06-19 Thread Uros Bizjak
On Sun, Jun 19, 2011 at 8:39 PM, H.J. Lu wrote: >>> I can't approve the configury changes and would like to defer >>> to target maintainers for the target specific changes.  That said, >>> I'm not familiar enough with the area of the patch.  But yes, >>> it's stage1 now - so if anyone else wants

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

2011-06-19 Thread H.J. Lu
On Fri, Jun 3, 2011 at 5:51 AM, H.J. Lu wrote: > On Fri, Jun 3, 2011 at 5:31 AM, Richard Guenther > wrote: >> On Fri, Jun 3, 2011 at 6:31 AM, H.J. Lu wrote: >>> On Wed, May 18, 2011 at 8:57 AM, H.J. Lu wrote: On Tue, Apr 26, 2011 at 6:05 AM, H.J. Lu wrote: > On Thu, Mar 31, 2011 at 7:

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

2011-06-03 Thread Michael Eager
On 06/03/2011 05:31 AM, Richard Guenther wrote: On Fri, Jun 3, 2011 at 6:31 AM, H.J. Lu wrote: On Wed, May 18, 2011 at 8:57 AM, H.J. Lu wrote: On Tue, Apr 26, 2011 at 6:05 AM, H.J. Lu wrote: On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: On Mon, Mar 21, 2011 at 11:40 AM, H.J. Lu wrote:

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

2011-06-03 Thread H.J. Lu
On Fri, Jun 3, 2011 at 5:31 AM, Richard Guenther wrote: > On Fri, Jun 3, 2011 at 6:31 AM, H.J. Lu wrote: >> On Wed, May 18, 2011 at 8:57 AM, H.J. Lu wrote: >>> On Tue, Apr 26, 2011 at 6:05 AM, H.J. Lu wrote: On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: > On Mon, Mar 21, 2011 at 11:

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

2011-06-03 Thread Richard Guenther
On Fri, Jun 3, 2011 at 6:31 AM, H.J. Lu wrote: > On Wed, May 18, 2011 at 8:57 AM, H.J. Lu wrote: >> On Tue, Apr 26, 2011 at 6:05 AM, H.J. Lu wrote: >>> On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: On Mon, Mar 21, 2011 at 11:40 AM, H.J. Lu wrote: > On Mon, Mar 14, 2011 at 12:28 PM,

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

2011-06-02 Thread H.J. Lu
On Wed, May 18, 2011 at 8:57 AM, H.J. Lu wrote: > On Tue, Apr 26, 2011 at 6:05 AM, H.J. Lu wrote: >> On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: >>> On Mon, Mar 21, 2011 at 11:40 AM, H.J. Lu wrote: On Mon, Mar 14, 2011 at 12:28 PM, H.J. Lu wrote: > On Thu, Jan 27, 2011 at 2:40 AM,

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

2011-06-01 Thread Carrot Wei
Hi H.J. This patch is also important to ChromeOS toolchain. Could you also try to update and test it for google/main? thanks Carrot On Wed, May 18, 2011 at 11:57 PM, H.J. Lu wrote: > On Tue, Apr 26, 2011 at 6:05 AM, H.J. Lu wrote: >> On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: >>> On Mon,

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

2011-05-18 Thread H.J. Lu
On Tue, Apr 26, 2011 at 6:05 AM, H.J. Lu wrote: > On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: >> On Mon, Mar 21, 2011 at 11:40 AM, H.J. Lu wrote: >>> On Mon, Mar 14, 2011 at 12:28 PM, H.J. Lu wrote: On Thu, Jan 27, 2011 at 2:40 AM, Richard Guenther wrote: > On Thu, Jan 27, 20

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

2011-04-26 Thread H.J. Lu
On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: > On Mon, Mar 21, 2011 at 11:40 AM, H.J. Lu wrote: >> On Mon, Mar 14, 2011 at 12:28 PM, H.J. Lu wrote: >>> On Thu, Jan 27, 2011 at 2:40 AM, Richard Guenther >>> wrote: On Thu, Jan 27, 2011 at 12:12 AM, H.J. Lu wrote: > On Tue, Dec 14, 20

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

2011-04-14 Thread H.J. Lu
On Thu, Mar 31, 2011 at 7:57 AM, H.J. Lu wrote: > On Mon, Mar 21, 2011 at 11:40 AM, H.J. Lu wrote: >> On Mon, Mar 14, 2011 at 12:28 PM, H.J. Lu wrote: >>> On Thu, Jan 27, 2011 at 2:40 AM, Richard Guenther >>> wrote: On Thu, Jan 27, 2011 at 12:12 AM, H.J. Lu wrote: > On Tue, Dec 14, 20

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

2011-03-31 Thread H.J. Lu
On Mon, Mar 21, 2011 at 11:40 AM, H.J. Lu wrote: > On Mon, Mar 14, 2011 at 12:28 PM, H.J. Lu wrote: >> On Thu, Jan 27, 2011 at 2:40 AM, Richard Guenther >> wrote: >>> On Thu, Jan 27, 2011 at 12:12 AM, H.J. Lu wrote: On Tue, Dec 14, 2010 at 05:20:48PM -0800, H.J. Lu wrote: > This patch

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

2011-03-21 Thread H.J. Lu
On Mon, Mar 14, 2011 at 12:28 PM, H.J. Lu wrote: > On Thu, Jan 27, 2011 at 2:40 AM, Richard Guenther > wrote: >> On Thu, Jan 27, 2011 at 12:12 AM, H.J. Lu wrote: >>> On Tue, Dec 14, 2010 at 05:20:48PM -0800, H.J. Lu wrote: This patch uses .init_array/.fini_array sections instead of .ct