Revert 2013-02-04, 2013-01-22 and 2013-01-21 changes.
authorAlan Modra <amodra@gmail.com>
Tue, 5 Feb 2013 21:47:32 +0000 (21:47 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 5 Feb 2013 21:47:32 +0000 (21:47 +0000)
18 files changed:
ld/ChangeLog
ld/NEWS
ld/emultempl/alphaelf.em
ld/emultempl/cr16elf.em
ld/emultempl/crxelf.em
ld/emultempl/elf32.em
ld/emultempl/hppaelf.em
ld/emultempl/ia64elf.em
ld/emultempl/mipself.em
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/new-dtags-1.d [deleted file]
ld/testsuite/ld-elf/new-dtags-2.d [deleted file]
ld/testsuite/ld-elf/new-dtags-3.d [deleted file]
ld/testsuite/ld-elf/new-dtags-4.d [deleted file]
ld/testsuite/ld-elf/new-dtags-5.d [deleted file]
ld/testsuite/ld-elf/new-dtags-6.d [deleted file]
ld/testsuite/ld-elf/new-dtags-7.d [deleted file]
ld/testsuite/ld-elf/new-dtags-8.d [deleted file]

index 0a08753..cbd2316 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-06  Alan Modra  <amodra@gmail.com>
+
+       PR ld/15096
+       * emultempl/elf32.em: Revert 2013-02-04, 2013-01-22 and 2013-01-21.
+       * emultempl/alphaelf.em: Revert 2013-02-04.
+       * emultempl/cr16elf.em: Likewise.
+       * emultempl/crxelf.em: Likewise.
+       * emultempl/hppaelf.em: Likewise.
+       * emultempl/ia64elf.em: Likewise.
+       * emultempl/mipself.em: Likewise.
+       * NEWS: Revert 2013-01-21.
+
 2013-02-04  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/15096
diff --git a/ld/NEWS b/ld/NEWS
index dbc3cee..09c56ef 100644 (file)
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -6,8 +6,6 @@
 
 * --enable-new-dtags no longer generates old dtags in addition to new dtags.
 
-* For Linux/GNU targets, new dtags is now the default.
-
 Changes in 2.23:
 
 * Enable compressed debug section feature for x86/x86_64 pe-coff.
index d44de52..21064ad 100644 (file)
@@ -80,7 +80,7 @@ alpha_after_parse (void)
                                   exp_nameop (SIZEOF_HEADERS, NULL)),
                        NULL);
 
-  gld${EMULATION_NAME}_after_parse ();
+  after_parse_default ();
 }
 
 static void
index 0cf5e39..f76b95e 100644 (file)
@@ -119,7 +119,7 @@ cr16elf_after_parse (void)
      is true the link sometimes fails.  */
   config.magic_demand_paged = FALSE;
 
-  gld${EMULATION_NAME}_after_parse ();
+  after_parse_default ();
 }
 
 /* This is called after the sections have been attached to output
index ae12f5e..c6d5a8d 100644 (file)
@@ -43,7 +43,7 @@ crxelf_after_parse (void)
      is true the link sometimes fails.  */
   config.magic_demand_paged = FALSE;
 
-  gld${EMULATION_NAME}_after_parse ();
+  after_parse_default ();
 }
 
 /* This is called after the sections have been attached to output
index 482e9ca..e2f2a1a 100644 (file)
@@ -63,7 +63,6 @@ fragment <<EOF
 
 /* Declare functions used by various EXTRA_EM_FILEs.  */
 static void gld${EMULATION_NAME}_before_parse (void);
-static void gld${EMULATION_NAME}_after_parse (void);
 static void gld${EMULATION_NAME}_after_open (void);
 static void gld${EMULATION_NAME}_before_allocation (void);
 static void gld${EMULATION_NAME}_after_allocation (void);
@@ -71,15 +70,6 @@ static lang_output_section_statement_type *gld${EMULATION_NAME}_place_orphan
   (asection *, const char *, int);
 EOF
 
-if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
-  fragment <<EOF
-
-/* TRUE if link_info.new_dtags is set.  */
-static bfd_boolean new_dtags_set;
-
-EOF
-fi
-
 if [ "x${USE_LIBPATH}" = xyes ] ; then
   case ${target} in
     *-*-linux-* | *-*-k*bsd*-* | *-*-gnu*)
@@ -120,35 +110,6 @@ gld${EMULATION_NAME}_before_parse (void)
 EOF
 fi
 
-fragment <<EOF
-static void
-gld${EMULATION_NAME}_after_parse (void)
-{
-EOF
-
-if test x"$LDEMUL_AFTER_PARSE" != xgld"$EMULATION_NAME"_after_parse; then
-# Enable the "new" dtags by default only for Linux target emulation if
-# -rpath isn't used.
-case ${target} in
-  *-*-linux-* | *-*-k*bsd*-* | *-*-gnu* | *-*-nacl*)
-    case " ${EMULATION_LIBPATH} " in
-      *" ${EMULATION_NAME} "*)
-fragment <<EOF
-  if (!new_dtags_set && command_line.rpath == NULL) 
-    link_info.new_dtags = TRUE;
-EOF
-      ;;
-    esac
-    ;;
-esac
-
-fragment <<EOF
-  after_parse_default ();
-}
-
-EOF
-fi
-
 if test x"$LDEMUL_RECOGNIZED_FILE" != xgld"${EMULATION_NAME}"_load_symbols; then
 fragment <<EOF
 /* Handle the generation of DT_NEEDED tags.  */
@@ -1355,12 +1316,12 @@ EOF
     ;;
 
     *-*-linux-* | *-*-k*bsd*-* | *-*-gnu*)
-    # Linux
       fragment <<EOF
          if (gld${EMULATION_NAME}_check_ld_so_conf (l, force))
            break;
 
 EOF
+    # Linux
     ;;
   esac
 fi
@@ -2256,12 +2217,10 @@ fragment <<EOF
 
     case OPTION_DISABLE_NEW_DTAGS:
       link_info.new_dtags = FALSE;
-      new_dtags_set = TRUE;
       break;
 
     case OPTION_ENABLE_NEW_DTAGS:
       link_info.new_dtags = TRUE;
-      new_dtags_set = TRUE;
       break;
 
     case OPTION_EH_FRAME_HDR:
@@ -2546,7 +2505,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
   ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse},
   ${LDEMUL_SYSLIB-syslib_default},
   ${LDEMUL_HLL-hll_default},
-  ${LDEMUL_AFTER_PARSE-gld${EMULATION_NAME}_after_parse},
+  ${LDEMUL_AFTER_PARSE-after_parse_default},
   ${LDEMUL_AFTER_OPEN-gld${EMULATION_NAME}_after_open},
   ${LDEMUL_AFTER_ALLOCATION-gld${EMULATION_NAME}_after_allocation},
   ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
index b315e51..65c1ea5 100644 (file)
@@ -60,7 +60,7 @@ hppaelf_after_parse (void)
                          NULL);
   */
 
-  gld${EMULATION_NAME}_after_parse ();
+  after_parse_default ();
 }
 
 /* This is called before the input files are opened.  We create a new
index 8eca763..88d5748 100644 (file)
@@ -31,12 +31,12 @@ fragment <<EOF
 static int itanium = 0;
 
 static void
-gld_${EMULATION_NAME}_after_parse (void)
+gld${EMULATION_NAME}_after_parse (void)
 {
   link_info.relax_pass = 2;
   bfd_elf${ELFSIZE}_ia64_after_parse (itanium);
 
-  gld${EMULATION_NAME}_after_parse ();
+  after_parse_default ();
 }
 
 EOF
@@ -61,5 +61,5 @@ PARSE_AND_LIST_ARGS_CASES='
       break;
 '
 
-LDEMUL_AFTER_PARSE=gld_${EMULATION_NAME}_after_parse
+LDEMUL_AFTER_PARSE=gld${EMULATION_NAME}_after_parse
 source_em ${srcdir}/emultempl/needrelax.em
index d685b87..9ac61a2 100644 (file)
@@ -45,7 +45,7 @@ mips_after_parse (void)
       link_info.emit_hash = TRUE;
       link_info.emit_gnu_hash = FALSE;
     }
-  gld${EMULATION_NAME}_after_parse ();
+  after_parse_default ();
 }
 
 struct hook_stub_info
index e2f6291..c6f26a8 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-06  Alan Modra  <amodra@gmail.com>
+
+       PR ld/15096
+       * ld-elf/new-dtags-1.d: Delete.
+       * ld-elf/new-dtags-2.d: Likewise.
+       * ld-elf/new-dtags-3.d: Likewise.
+       * ld-elf/new-dtags-4.d: Likewise.
+       * ld-elf/new-dtags-5.d: Likewise.
+       * ld-elf/new-dtags-6.d: Likewise.
+       * ld-elf/new-dtags-7.d: Likewise.
+       * ld-elf/new-dtags-8.d: Likewise.
+
 2013-02-04  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/15096
diff --git a/ld/testsuite/ld-elf/new-dtags-1.d b/ld/testsuite/ld-elf/new-dtags-1.d
deleted file mode 100644 (file)
index 918a326..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#source: start.s
-#readelf: -d -W
-#ld: -shared -rpath .
-#target: *-*-linux* *-*-gnu*
-
-#failif
-#...
- +0x[0-9a-f]+ +\(RUNPATH\) +Library runpath: +\[.\]
-#...
diff --git a/ld/testsuite/ld-elf/new-dtags-2.d b/ld/testsuite/ld-elf/new-dtags-2.d
deleted file mode 100644 (file)
index 17be86d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#source: start.s
-#readelf: -d -W
-#ld: -shared -rpath .
-#target: *-*-linux* *-*-gnu*
-
-#...
- +0x[0-9a-f]+ +\(RPATH\) +Library rpath: +\[.\]
-#pass
diff --git a/ld/testsuite/ld-elf/new-dtags-3.d b/ld/testsuite/ld-elf/new-dtags-3.d
deleted file mode 100644 (file)
index 4d06639..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#source: start.s
-#readelf: -d -W
-#ld: -shared -rpath . --enable-new-dtags
-#target: *-*-linux* *-*-gnu*
-
-#failif
-#...
- +0x[0-9a-f]+ +\(RPATH\) +Library rpath: +\[.\]
-#...
diff --git a/ld/testsuite/ld-elf/new-dtags-4.d b/ld/testsuite/ld-elf/new-dtags-4.d
deleted file mode 100644 (file)
index 0df8af6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#source: start.s
-#readelf: -d -W
-#ld: -shared -rpath . --enable-new-dtags
-#target: *-*-linux* *-*-gnu*
-
-#...
- +0x[0-9a-f]+ +\(RUNPATH\) +Library runpath: +\[.\]
-#pass
diff --git a/ld/testsuite/ld-elf/new-dtags-5.d b/ld/testsuite/ld-elf/new-dtags-5.d
deleted file mode 100644 (file)
index eb1a587..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#source: start.s
-#readelf: -d -W
-#ld: -shared -z now
-#target: *-*-linux* *-*-gnu*
-
-#failif
-#...
- 0x[0-9a-f]+ +\(BIND_NOW\) +
-#...
diff --git a/ld/testsuite/ld-elf/new-dtags-6.d b/ld/testsuite/ld-elf/new-dtags-6.d
deleted file mode 100644 (file)
index e2734e7..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#source: start.s
-#readelf: -d -W
-#ld: -shared -z now
-#target: *-*-linux* *-*-gnu*
-
-#...
- 0x[0-9a-f]+ +\(FLAGS\) +BIND_NOW
-#pass
diff --git a/ld/testsuite/ld-elf/new-dtags-7.d b/ld/testsuite/ld-elf/new-dtags-7.d
deleted file mode 100644 (file)
index fa98065..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#source: start.s
-#readelf: -d -W
-#ld: -shared -z now --disable-new-dtags
-#target: *-*-linux* *-*-gnu*
-
-#failif
-#...
- 0x[0-9a-f]+ +\(FLAGS\) +BIND_NOW
-#pass
diff --git a/ld/testsuite/ld-elf/new-dtags-8.d b/ld/testsuite/ld-elf/new-dtags-8.d
deleted file mode 100644 (file)
index 421063d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#source: start.s
-#readelf: -d -W
-#ld: -shared -z now --disable-new-dtags
-#target: *-*-linux* *-*-gnu*
-
-#...
- 0x[0-9a-f]+ +\(BIND_NOW\) +
-#pass