Have the linker's help text include the default setting of the --hash-style option...
authorNick Clifton <nickc@redhat.com>
Wed, 13 May 2020 09:59:02 +0000 (10:59 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 13 May 2020 09:59:02 +0000 (10:59 +0100)
PR 25979
* lexsup.c (elf_shlib_list_options): Include the default value for
the hash style in the output text.

ld/ChangeLog
ld/lexsup.c

index 9ad0996a20ebdcaf6fb7889cb0d63c8afb718385..5923e4ca36bc03f211f783c659851322a9470263 100644 (file)
@@ -1,3 +1,9 @@
+2020-05-13  Nick Clifton  <nickc@redhat.com>
+
+       PR 25979
+       * lexsup.c (elf_shlib_list_options): Include the default value for
+       the hash style in the output text.
+
 2020-05-11  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-powerpc/pcrelopt.s: Add lxvp and stxvp.
index d1955b9afaba8c94055617e741ff798cf24792ba..c02041d5f103252f1ef4d777b04b7ed3661d3c97 100644 (file)
@@ -1775,7 +1775,24 @@ elf_shlib_list_options (FILE *file)
   fprintf (file, _("\
   --exclude-libs=LIBS         Make all symbols in LIBS hidden\n"));
   fprintf (file, _("\
-  --hash-style=STYLE          Set hash style to sysv, gnu or both\n"));
+  --hash-style=STYLE          Set hash style to sysv/gnu/both.  Default: "));
+  if (DEFAULT_EMIT_SYSV_HASH)
+    {
+      /* Note - these strings are not translated as
+        they are keywords not descriptive text.  */
+      if (DEFAULT_EMIT_GNU_HASH)
+       fprintf (file, "both\n");
+      else
+       fprintf (file, "sysv\n");
+    }
+  else
+    {
+      if (DEFAULT_EMIT_GNU_HASH)
+       fprintf (file, "gnu\n");
+      else
+       /* FIXME: Can this happen ?  */
+       fprintf (file, "none\n");
+    }
   fprintf (file, _("\
   -P AUDITLIB, --depaudit=AUDITLIB\n" "\
                               Specify a library to use for auditing dependencies\n"));
This page took 0.025203 seconds and 4 git commands to generate.