Index: gold/testsuite/Makefile.am =================================================================== RCS file: /cvs/src/src/gold/testsuite/Makefile.am,v retrieving revision 1.188 diff -u -u -p -r1.188 Makefile.am --- gold/testsuite/Makefile.am 16 Feb 2012 19:37:33 -0000 1.188 +++ gold/testsuite/Makefile.am 16 Mar 2012 09:11:51 -0000 @@ -875,6 +875,7 @@ initpri3a_LDADD = check_PROGRAMS += initpri3b initpri3b_SOURCES = initpri3.c +initpri3b_CFLAGS = -DNO_CTORS_IN_INIT_ARRAY initpri3b_DEPENDENCIES = gcctestdir/ld initpri3b_LDFLAGS = -Bgcctestdir/ -Wl,--no-ctors-in-init-array initpri3b_LDADD = Index: gold/testsuite/initpri3.c =================================================================== RCS file: /cvs/src/src/gold/testsuite/initpri3.c,v retrieving revision 1.1 diff -u -u -p -r1.1 initpri3.c --- gold/testsuite/initpri3.c 25 Jun 2011 00:40:56 -0000 1.1 +++ gold/testsuite/initpri3.c 16 Mar 2012 09:11:51 -0000 @@ -75,6 +75,10 @@ void (*dtors[]) (void) int main (void) { + /* ARM does not use .ctors and .dtors sections. This test + fails if --no-ctors-in-init-array is used. */ +#if !defined(__arm__) || !defined(NO_CTORS_IN_INIT_ARRAY) assert (i == 3); +#endif return 0; }