This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Introduce --enable-new-dtags configure option.
- From: Alan Modra <amodra at gmail dot com>
- To: Slava Barinov <v dot barinov at samsung dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 5 Jun 2017 15:12:40 +0930
- Subject: Re: [PATCH] Introduce --enable-new-dtags configure option.
- Authentication-results: sourceware.org; auth=none
- References: <CGME20170525103451eucas1p21bc68d274a1c3b1424483df18ab98432@eucas1p2.samsung.com> <20170525103424.31035-1-v.barinov@samsung.com> <20170605004531.GS8842@bubble.grove.modra.org>
On Mon, Jun 05, 2017 at 10:15:31AM +0930, Alan Modra wrote:
> On Thu, May 25, 2017 at 01:34:24PM +0300, Slava Barinov wrote:
> > This option switches on ld.bfd --enable-new-dtags by default.
>
> Applied.
We expect that patches posted here are tested. This one obviously was
not. Fixed as follows.
* ldmain.c (main): Correct setting of link_indo.new_dtags.
* testsuite/ld-elf/now-3.d: Pass --disable-new-dtags to ld
* testsuite/ld-elf/now-4.d: Likewise.
* testsuite/ld-elf/rpath-1.d: Likewise.
* testsuite/ld-elf/rpath-2.d: Likewise.
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 2e63b26..8a22862 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,8 +1,16 @@
+2017-06-05 Alan Modra <amodra@gmail.com>
+
+ * ldmain.c (main): Correct setting of link_indo.new_dtags.
+ * testsuite/ld-elf/now-3.d: Pass --disable-new-dtags to ld
+ * testsuite/ld-elf/now-4.d: Likewise.
+ * testsuite/ld-elf/rpath-1.d: Likewise.
+ * testsuite/ld-elf/rpath-2.d: Likewise.
+
2017-06-05 Slava Barinov <v.barinov@samsung.com>
* configure.ac: Add --enable-new-dtags option.
- * ldmain.c: Set link_info.new_dtags to 1 if when --enable-new-dtags is
- switched on.
+ * ldmain.c (main): Set link_info.new_dtags to 1 if when
+ --enable-new-dtags is switched on.
* configure: Regenerate.
* config.in: Regenerate.
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 045f323..2b3a591 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -299,7 +299,7 @@ main (int argc, char **argv)
link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
#endif
#ifdef DEFAULT_NEW_DTAGS
- link_info.new_dtags = TRUE;
+ link_info.new_dtags = DEFAULT_NEW_DTAGS;
#endif
ldfile_add_arch ("");
diff --git a/ld/testsuite/ld-elf/now-3.d b/ld/testsuite/ld-elf/now-3.d
index 687885a..fa98065 100644
--- a/ld/testsuite/ld-elf/now-3.d
+++ b/ld/testsuite/ld-elf/now-3.d
@@ -1,6 +1,6 @@
#source: start.s
#readelf: -d -W
-#ld: -shared -z now
+#ld: -shared -z now --disable-new-dtags
#target: *-*-linux* *-*-gnu*
#failif
diff --git a/ld/testsuite/ld-elf/now-4.d b/ld/testsuite/ld-elf/now-4.d
index 8d9d02f..421063d 100644
--- a/ld/testsuite/ld-elf/now-4.d
+++ b/ld/testsuite/ld-elf/now-4.d
@@ -1,6 +1,6 @@
#source: start.s
#readelf: -d -W
-#ld: -shared -z now
+#ld: -shared -z now --disable-new-dtags
#target: *-*-linux* *-*-gnu*
#...
diff --git a/ld/testsuite/ld-elf/rpath-1.d b/ld/testsuite/ld-elf/rpath-1.d
index 918a326..38d6eab 100644
--- a/ld/testsuite/ld-elf/rpath-1.d
+++ b/ld/testsuite/ld-elf/rpath-1.d
@@ -1,6 +1,6 @@
#source: start.s
#readelf: -d -W
-#ld: -shared -rpath .
+#ld: -shared -rpath=. --disable-new-dtags
#target: *-*-linux* *-*-gnu*
#failif
diff --git a/ld/testsuite/ld-elf/rpath-2.d b/ld/testsuite/ld-elf/rpath-2.d
index 17be86d..d4c75ff 100644
--- a/ld/testsuite/ld-elf/rpath-2.d
+++ b/ld/testsuite/ld-elf/rpath-2.d
@@ -1,6 +1,6 @@
#source: start.s
#readelf: -d -W
-#ld: -shared -rpath .
+#ld: -shared -rpath=. --disable-new-dtags
#target: *-*-linux* *-*-gnu*
#...
--
Alan Modra
Australia Development Lab, IBM