* configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): False for powerpc.
authorAlan Modra <amodra@gmail.com>
Wed, 5 Sep 2012 11:01:43 +0000 (11:01 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 5 Sep 2012 11:01:43 +0000 (11:01 +0000)
* 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.

15 files changed:
gold/ChangeLog
gold/configure
gold/configure.ac
gold/testsuite/Makefile.am
gold/testsuite/Makefile.in
gold/testsuite/discard_locals_test.sh
gold/testsuite/justsyms_exec.c
gold/testsuite/pr14265.t
gold/testsuite/script_test_2.t
gold/testsuite/script_test_3.t
gold/testsuite/script_test_4.t
gold/testsuite/script_test_5.t
gold/testsuite/script_test_6.t
gold/testsuite/script_test_7.t
gold/testsuite/script_test_9.t

index faa228ec364e08cf4b52f802533543209b1ad0a6..72f3085c835105766ac1bf556c7f13c64b62adfc 100644 (file)
@@ -1,3 +1,22 @@
+2012-09-05  Alan Modra  <amodra@gmail.com>
+
+       * 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.
+
 2012-09-05  Alan Modra  <amodra@gmail.com>
 
        * powerpc.cc (Powerpc_relobj::get_opd_ent): Make const.
index 0bffe088c86b7954ba3c59bb6889cc132516da17..dff9cacccde275ef5173b3885c4fe87ceffa0c58 100755 (executable)
@@ -6279,7 +6279,7 @@ fi
 
  if
   case $target_cpu in
-    i?86) true;;
+    powerpc*) false;;
     x86_64) false;;
     sparc64) false;;
     *) true;;
index 05e807b64437ac289712d7a99c2526bf3b488ef7..69fe20915953e4819fcc10577a82c1fd33d77c32 100644 (file)
@@ -304,7 +304,7 @@ dnl tell the unittest framework if we're compiling for one of those
 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 146c7e03b85c9e67700d605889288e452ef3adfd..4840f080dc8d0bb2ca6d1c45c0839a5fea7cce4e 100644 (file)
@@ -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_layout.cc
 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 memory_test memory_test.o
 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 b937ff0e9528c5ea12d708f8c51dab9d353ef037..27b3a90830d06f52057171c82dbbcfddfa661669 100644 (file)
@@ -330,7 +330,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   plugin_test_7.syms \
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   plugin_test_9.err \
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   plugin_final_layout.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   plugin_final_layout.readelf.stdout
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   plugin_final_layout_readelf.stdout
 # Make a copy of two_file_test_1.o, which does not define the symbol _Z4t16av.
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_36 =  \
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   plugin_test_1.err \
@@ -4316,7 +4316,7 @@ uninstall-am:
 @GCC_TRUE@@NATIVE_LINKER_TRUE@final_layout: final_layout.o final_layout_sequence.txt gcctestdir/ld
 @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--section-ordering-file,final_layout_sequence.txt final_layout.o
 @GCC_TRUE@@NATIVE_LINKER_TRUE@final_layout.stdout: final_layout
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_NM) -n final_layout > final_layout.stdout
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_NM) -n --synthetic final_layout > final_layout.stdout
 @GCC_TRUE@@NATIVE_LINKER_TRUE@icf_virtual_function_folding_test.o: icf_virtual_function_folding_test.cc
 @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIE -g -o $@ $<
 @GCC_TRUE@@NATIVE_LINKER_TRUE@icf_virtual_function_folding_test: icf_virtual_function_folding_test.o gcctestdir/ld
@@ -4875,8 +4875,8 @@ uninstall-am:
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@plugin_final_layout: plugin_final_layout.o plugin_section_order.so gcctestdir/ld
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   $(CXXLINK) -Bgcctestdir/ -Wl,--plugin,"./plugin_section_order.so" plugin_final_layout.o
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@plugin_final_layout.stdout: plugin_final_layout
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   $(TEST_NM) -n plugin_final_layout > plugin_final_layout.stdout
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@plugin_final_layout.readelf.stdout: plugin_final_layout
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   $(TEST_NM) -n --synthetic plugin_final_layout > plugin_final_layout.stdout
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@plugin_final_layout_readelf.stdout: plugin_final_layout
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@   $(TEST_READELF) -Wl plugin_final_layout > plugin_final_layout_readelf.stdout
 
 @GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@plugin_section_order.so: plugin_section_order.o
@@ -5084,7 +5084,7 @@ uninstall-am:
 @GCC_TRUE@@NATIVE_LINKER_TRUE@memory_test.o: memory_test.s
 @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -o $@ -c $<
 @GCC_TRUE@@NATIVE_LINKER_TRUE@memory_test: memory_test.o gcctestdir/ld $(srcdir)/memory_test.t
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -T $(srcdir)/memory_test.t -o $@ memory_test.o
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -z max-page-size=0x1000 -z common-page-size=0x1000 -T $(srcdir)/memory_test.t -o $@ memory_test.o
 @GCC_TRUE@@NATIVE_LINKER_TRUE@memory_test.stdout: memory_test
 @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -lWS  $< > $@
 @GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test.o: gdb_index_test.cc
index 3fc679a45855622a0cb09fccf7b4361b3e6d4804..0d0a118472dbaffe7e60370fa5dc06ee01c3c9f5 100755 (executable)
@@ -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 6155147d8c6283897dcd49ce1e8f3bec807f3235..66702863b7f290ccf20a36299fa1269d47ab3477 100644 (file)
@@ -47,7 +47,10 @@ check(void *sym, long v, const char *name)
 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 eec56e7729904a9cbd3229ee1c417d3788e0dd1f..e6d163af5ca86a2a38b1cbb0b03c2380fdcf2cf9 100644 (file)
@@ -15,6 +15,8 @@ SECTIONS
         KEEP(*(.foo2.*))
         __foo2_end = .;
     }
+
+    .got : { *(.got .toc) }
 }
 
 
index 6a0188f8bc4133c7d6b1fefd9b5500d4023ca4bd..81ed9aadab4aac2b19b1e51b7670d6ea4558689b 100644 (file)
@@ -32,6 +32,7 @@ SECTIONS
   . += 0x100000;
   . = ALIGN(0x100);
   .data : { *(.data) }
+  .got : { *(.got .toc) }
   .bss : { *(.bss) }
 
   /* Now the real test.  */
index c97099cfaed0dc3512df479117440b315685b8fa..9c75194c49e05a9b6d0e55c429f4873f3bcae695 100644 (file)
@@ -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 98417733b8d2c24fa2ca8b5f4c68f18726a6b4b0..f5569c5e2d797d7f4c6e793bf1a885c0a655d545 100644 (file)
@@ -37,6 +37,7 @@ SECTIONS
   . = ALIGN(0x100);
   .dynamic : { *(.dynamic) }
   .data : { *(.data) }
+  .got : { *(.got .toc) }
   . += 0x100000;
   . = ALIGN(0x100);
   .bss : { *(.bss) }
index fe67c4e5f863f4a5d563c37d6895ffefd3e82bba..4a7d13f6e67463b9fd83cbc0cb08dcc406ae0ba4 100644 (file)
@@ -37,6 +37,7 @@ SECTIONS
   . = ALIGN(0x100);
   .dynamic : { *(.dynamic) }
   .data : { *(.data) }
+  .got : { *(.got .toc) }
   . += 0x100000;
   . = ALIGN(0x100);
   .bss : { *(.bss) }
index 01a8a171fd582de5a7113baf2397770f2ee3c221..d3127e39fee4866c49945fed13bc5c5b0a3d1877 100644 (file)
@@ -38,6 +38,7 @@ SECTIONS
   . = ALIGN(0x100);
   .dynamic : { *(.dynamic) }
   .data : { *(.data) }
+  .got : { *(.got .toc) }
   . += 0x100000;
   . = ALIGN(0x100);
   .bss : { *(.bss) }
index 7adcf5fdf5e3c543ab2ce525b21134fdfdb4a970..ab2bbeea381c2ac8f83221a0d955cd7db68ca4b2 100644 (file)
@@ -38,6 +38,7 @@ SECTIONS
 
   . = SEGMENT_START(".data", 0x10200000);
   .data : { *(.data) }
+  .got : { *(.got .toc) }
 
   . = SEGMENT_START(".bss", 0x10400000);
   .bss : { *(.bss) }
index df055ba0f268f7936fcd7370dca595e8abb72d5f..e7138b274d4efeb3713d5d394617f5f2b8887812 100644 (file)
@@ -16,6 +16,7 @@ SECTIONS
   .data :
   {
   } :data
+  .got : { *(.got .toc) }
   .tdata :
   {
     *(.tdata*)