ld: Correct --dependency-file order

Message ID 20200624134139.333282-1-hjl.tools@gmail.com
State New
Headers show
Series
  • ld: Correct --dependency-file order
Related show

Commit Message

Cui, Lili via Binutils June 24, 2020, 1:41 p.m.
Change ld --help output to

  -d, -dc, -dp                Force common symbols to be defined
  --dependency-file FILE      Write dependency file

instead of

  -d, -dc                     Force common symbols to be defined
  --dependency-file FILE, -dp Write dependency file

	PR ld/26165
	* lexsup.c (ld_options): Correct --dependency-file order.
---
 ld/ChangeLog | 5 +++++
 ld/lexsup.c  | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.26.2

Patch

diff --git a/ld/ChangeLog b/ld/ChangeLog
index bf171da0fa..6f586506b1 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@ 
+2020-06-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/26165
+	* lexsup.c (ld_options): Correct --dependency-file order.
+
 2020-06-24  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR ld/26083
diff --git a/ld/lexsup.c b/ld/lexsup.c
index d6e9367e9f..58c6c07832 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -111,10 +111,10 @@  static const struct ld_option ld_options[] =
     'c', N_("FILE"), N_("Read MRI format linker script"), TWO_DASHES },
   { {"dc", no_argument, NULL, 'd'},
     'd', NULL, N_("Force common symbols to be defined"), ONE_DASH },
-  { {"dependency-file", required_argument, NULL, OPTION_DEPENDENCY_FILE},
-    '\0', N_("FILE"), N_("Write dependency file"), TWO_DASHES },
   { {"dp", no_argument, NULL, 'd'},
     '\0', NULL, NULL, ONE_DASH },
+  { {"dependency-file", required_argument, NULL, OPTION_DEPENDENCY_FILE},
+    '\0', N_("FILE"), N_("Write dependency file"), TWO_DASHES },
   { {"force-group-allocation", no_argument, NULL,
      OPTION_FORCE_GROUP_ALLOCATION},
     '\0', NULL, N_("Force group members out of groups"), TWO_DASHES },