aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-05-13 10:59:02 +0100
committerNick Clifton <nickc@redhat.com>2020-05-13 10:59:02 +0100
commitba311c5b10ea387d68c63bf61de0885aa150cd69 (patch)
tree329448c43dee169c8cb2b0295469e5e24f294fd5 /ld
parent90d00bbd9c514a0fea52d9dc44b98ce1dd564094 (diff)
downloadgdb-ba311c5b10ea387d68c63bf61de0885aa150cd69.zip
gdb-ba311c5b10ea387d68c63bf61de0885aa150cd69.tar.gz
gdb-ba311c5b10ea387d68c63bf61de0885aa150cd69.tar.bz2
Have the linker's help text include the default setting of the --hash-style option, if relevent.
PR 25979 * lexsup.c (elf_shlib_list_options): Include the default value for the hash style in the output text.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/lexsup.c19
2 files changed, 24 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 9ad0996..5923e4c 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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.
diff --git a/ld/lexsup.c b/ld/lexsup.c
index d1955b9..c02041d 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -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"));