From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26222 invoked by alias); 5 Sep 2012 03:46:03 -0000 Received: (qmail 26206 invoked by uid 22791); 5 Sep 2012 03:46:00 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f41.google.com (HELO mail-pb0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Sep 2012 03:45:45 +0000 Received: by pbbro12 with SMTP id ro12so237751pbb.0 for ; Tue, 04 Sep 2012 20:45:44 -0700 (PDT) Received: by 10.66.90.4 with SMTP id bs4mr24156231pab.3.1346816744398; Tue, 04 Sep 2012 20:45:44 -0700 (PDT) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPS id hr9sm455435pbc.36.2012.09.04.20.45.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Sep 2012 20:45:43 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 81A34EA0384; Wed, 5 Sep 2012 13:15:38 +0930 (CST) Date: Wed, 05 Sep 2012 03:46:00 -0000 From: Alan Modra To: binutils@sourceware.org Subject: [GOLD] testsuite tweaks for powerpc Message-ID: <20120905034538.GS3159@bubble.grove.modra.org> Mail-Followup-To: binutils@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00051.txt.bz2 Various test tweaks for powerpc. - Non-pic shared libs don't work. - Adding synthetic syms lets the test see the ordering of code sections which is what the tests are checking, rather than the ordering of .opd entries. - memory_test assumes 4k pages - justsyms_exec looks at the address of a function, which on powerpc64 is the descriptor in .opd, a data section. - .toc input sections on powerpc64 need to be part of the .got output section. Tested on x86_64 too. OK? * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): False for powerpc. * configure: Regenerate. * testsuite/Makefile.am (final_layout.stdout): Pass --synthetic to nm. (plugin_final_layout.stdout): Likewise. (memory_test): Set page sizes to 0x1000. * testsuite/Makefile.in: Regenerate. * testsuite/discard_locals_test.sh: Add FIXME comment. * testsuite/justsyms_exec.c: Disable function test for powerpc64. * testsuite/pr14265.t: Add .got output section statement. * testsuite/script_test_2.t: Likewise. * testsuite/script_test_3.t: Likewise. * testsuite/script_test_4.t: Likewise. * testsuite/script_test_5.t: Likewise. * testsuite/script_test_6.t: Likewise. * testsuite/script_test_7.t: Likewise. * testsuite/script_test_9.t: Likewise. Index: gold/configure.ac =================================================================== RCS file: /cvs/src/src/gold/configure.ac,v retrieving revision 1.76 diff -u -p -r1.76 configure.ac --- gold/configure.ac 19 Jul 2012 00:19:34 -0000 1.76 +++ gold/configure.ac 5 Sep 2012 03:20:04 -0000 @@ -304,7 +304,7 @@ dnl tell the unittest framework if we're dnl targets, so it doesn't try to run the tests that do that. AM_CONDITIONAL(FN_PTRS_IN_SO_WITHOUT_PIC, [ case $target_cpu in - i?86) true;; + powerpc*) false;; x86_64) false;; sparc64) false;; *) true;; Index: gold/testsuite/Makefile.am =================================================================== RCS file: /cvs/src/src/gold/testsuite/Makefile.am,v retrieving revision 1.196 diff -u -p -r1.196 Makefile.am --- gold/testsuite/Makefile.am 24 Aug 2012 18:35:34 -0000 1.196 +++ gold/testsuite/Makefile.am 5 Sep 2012 03:20:05 -0000 @@ -228,7 +228,7 @@ final_layout_sequence.txt: final_layout: final_layout.o final_layout_sequence.txt gcctestdir/ld $(CXXLINK) -Bgcctestdir/ -Wl,--section-ordering-file,final_layout_sequence.txt final_layout.o final_layout.stdout: final_layout - $(TEST_NM) -n final_layout > final_layout.stdout + $(TEST_NM) -n --synthetic final_layout > final_layout.stdout check_PROGRAMS += icf_virtual_function_folding_test MOSTLYCLEANFILES += icf_virtual_function_folding_test @@ -1535,7 +1535,7 @@ plugin_final_layout.o: plugin_final_layo plugin_final_layout: plugin_final_layout.o plugin_section_order.so gcctestdir/ld $(CXXLINK) -Bgcctestdir/ -Wl,--plugin,"./plugin_section_order.so" plugin_final_layout.o plugin_final_layout.stdout: plugin_final_layout - $(TEST_NM) -n plugin_final_layout > plugin_final_layout.stdout + $(TEST_NM) -n --synthetic plugin_final_layout > plugin_final_layout.stdout plugin_final_layout_readelf.stdout: plugin_final_layout $(TEST_READELF) -Wl plugin_final_layout > plugin_final_layout_readelf.stdout @@ -1975,7 +1975,7 @@ MOSTLYCLEANFILES += memory_test.stdout m memory_test.o: memory_test.s $(COMPILE) -o $@ -c $< memory_test: memory_test.o gcctestdir/ld $(srcdir)/memory_test.t - $(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -T $(srcdir)/memory_test.t -o $@ memory_test.o + $(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -z max-page-size=0x1000 -z common-page-size=0x1000 -T $(srcdir)/memory_test.t -o $@ memory_test.o memory_test.stdout: memory_test $(TEST_READELF) -lWS $< > $@ Index: gold/testsuite/discard_locals_test.sh =================================================================== RCS file: /cvs/src/src/gold/testsuite/discard_locals_test.sh,v retrieving revision 1.2 diff -u -p -r1.2 discard_locals_test.sh --- gold/testsuite/discard_locals_test.sh 3 Mar 2010 19:31:54 -0000 1.2 +++ gold/testsuite/discard_locals_test.sh 5 Sep 2012 03:20:05 -0000 @@ -55,8 +55,10 @@ check_non_discarded() check_discarded "discard_locals_test.syms" "should_be_discarded" +# FIXME: gcc doesn't generate a .LC0 sym for powerpc64 check_non_discarded "discard_locals_relocatable_test1.syms" ".LC0" check_discarded "discard_locals_relocatable_test1.syms" "should_be_discarded" +# FIXME: gcc doesn't generate a .LC0 sym for powerpc64 check_non_discarded "discard_locals_relocatable_test2.syms" ".LC0" check_discarded "discard_locals_relocatable_test2.syms" "should_be_discarded" Index: gold/testsuite/justsyms_exec.c =================================================================== RCS file: /cvs/src/src/gold/testsuite/justsyms_exec.c,v retrieving revision 1.1 diff -u -p -r1.1 justsyms_exec.c --- gold/testsuite/justsyms_exec.c 2 Aug 2011 00:37:41 -0000 1.1 +++ gold/testsuite/justsyms_exec.c 5 Sep 2012 03:20:05 -0000 @@ -47,7 +47,10 @@ check(void *sym, long v, const char *nam int main(void) { +#ifndef __powerpc64__ + /* PowerPC64 uses function descriptors. */ check(exported_func, 0x1000200, "exported_func"); +#endif check(&exported_data, 0x2000000, "exported_data"); return errs; } Index: gold/testsuite/pr14265.t =================================================================== RCS file: /cvs/src/src/gold/testsuite/pr14265.t,v retrieving revision 1.1 diff -u -p -r1.1 pr14265.t --- gold/testsuite/pr14265.t 14 Aug 2012 08:31:57 -0000 1.1 +++ gold/testsuite/pr14265.t 5 Sep 2012 03:20:05 -0000 @@ -15,6 +15,8 @@ SECTIONS KEEP(*(.foo2.*)) __foo2_end = .; } + + .got : { *(.got .toc) } } Index: gold/testsuite/script_test_2.t =================================================================== RCS file: /cvs/src/src/gold/testsuite/script_test_2.t,v retrieving revision 1.4 diff -u -p -r1.4 script_test_2.t --- gold/testsuite/script_test_2.t 31 Oct 2011 22:51:03 -0000 1.4 +++ gold/testsuite/script_test_2.t 5 Sep 2012 03:20:05 -0000 @@ -32,6 +32,7 @@ SECTIONS . += 0x100000; . = ALIGN(0x100); .data : { *(.data) } + .got : { *(.got .toc) } .bss : { *(.bss) } /* Now the real test. */ Index: gold/testsuite/script_test_3.t =================================================================== RCS file: /cvs/src/src/gold/testsuite/script_test_3.t,v retrieving revision 1.5 diff -u -p -r1.5 script_test_3.t --- gold/testsuite/script_test_3.t 15 Sep 2010 17:39:57 -0000 1.5 +++ gold/testsuite/script_test_3.t 5 Sep 2012 03:20:05 -0000 @@ -35,6 +35,7 @@ SECTIONS . = ALIGN(0x100); .dynamic : { *(.dynamic) } :data :dynamic .data : { *(.data) } :data + .got : { *(.got .toc) } .tdata : { *(.tdata*) } :data :tls .tbss : { *(.tbss*) } :data :tls . += 0x100000; Index: gold/testsuite/script_test_4.t =================================================================== RCS file: /cvs/src/src/gold/testsuite/script_test_4.t,v retrieving revision 1.2 diff -u -p -r1.2 script_test_4.t --- gold/testsuite/script_test_4.t 15 Sep 2010 17:39:57 -0000 1.2 +++ gold/testsuite/script_test_4.t 5 Sep 2012 03:20:05 -0000 @@ -37,6 +37,7 @@ SECTIONS . = ALIGN(0x100); .dynamic : { *(.dynamic) } .data : { *(.data) } + .got : { *(.got .toc) } . += 0x100000; . = ALIGN(0x100); .bss : { *(.bss) } Index: gold/testsuite/script_test_5.t =================================================================== RCS file: /cvs/src/src/gold/testsuite/script_test_5.t,v retrieving revision 1.2 diff -u -p -r1.2 script_test_5.t --- gold/testsuite/script_test_5.t 15 Sep 2010 17:39:57 -0000 1.2 +++ gold/testsuite/script_test_5.t 5 Sep 2012 03:20:05 -0000 @@ -37,6 +37,7 @@ SECTIONS . = ALIGN(0x100); .dynamic : { *(.dynamic) } .data : { *(.data) } + .got : { *(.got .toc) } . += 0x100000; . = ALIGN(0x100); .bss : { *(.bss) } Index: gold/testsuite/script_test_6.t =================================================================== RCS file: /cvs/src/src/gold/testsuite/script_test_6.t,v retrieving revision 1.2 diff -u -p -r1.2 script_test_6.t --- gold/testsuite/script_test_6.t 15 Sep 2010 17:39:57 -0000 1.2 +++ gold/testsuite/script_test_6.t 5 Sep 2012 03:20:05 -0000 @@ -38,6 +38,7 @@ SECTIONS . = ALIGN(0x100); .dynamic : { *(.dynamic) } .data : { *(.data) } + .got : { *(.got .toc) } . += 0x100000; . = ALIGN(0x100); .bss : { *(.bss) } Index: gold/testsuite/script_test_7.t =================================================================== RCS file: /cvs/src/src/gold/testsuite/script_test_7.t,v retrieving revision 1.2 diff -u -p -r1.2 script_test_7.t --- gold/testsuite/script_test_7.t 15 Sep 2010 17:39:57 -0000 1.2 +++ gold/testsuite/script_test_7.t 5 Sep 2012 03:20:05 -0000 @@ -38,6 +38,7 @@ SECTIONS . = SEGMENT_START(".data", 0x10200000); .data : { *(.data) } + .got : { *(.got .toc) } . = SEGMENT_START(".bss", 0x10400000); .bss : { *(.bss) } Index: gold/testsuite/script_test_9.t =================================================================== RCS file: /cvs/src/src/gold/testsuite/script_test_9.t,v retrieving revision 1.2 diff -u -p -r1.2 script_test_9.t --- gold/testsuite/script_test_9.t 2 Mar 2011 21:59:36 -0000 1.2 +++ gold/testsuite/script_test_9.t 5 Sep 2012 03:20:05 -0000 @@ -16,6 +16,7 @@ SECTIONS .data : { } :data + .got : { *(.got .toc) } .tdata : { *(.tdata*) -- Alan Modra Australia Development Lab, IBM