This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] ld: Properly display default for -z separate-code
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 2 Jul 2018 15:04:48 -0700
- Subject: [PATCH] ld: Properly display default for -z separate-code
Check DEFAULT_LD_Z_SEPARATE_CODE to display default for -z separate-code.
PR ld/23358
* lexsup.c (elf_shlib_list_options): Properly display default
for -z separate-code.
---
ld/lexsup.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ld/lexsup.c b/ld/lexsup.c
index a4bc7da67f..86a033a383 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -1796,10 +1796,17 @@ elf_shlib_list_options (FILE *file)
fprintf (file, _("\
-z norelro Don't create RELRO program header (default)\n"));
#endif
+#if DEFAULT_LD_Z_SEPARATE_CODE
+ fprintf (file, _("\
+ -z separate-code Create separate code program header (default)\n"));
+ fprintf (file, _("\
+ -z noseparate-code Don't create separate code program header\n"));
+#else
fprintf (file, _("\
-z separate-code Create separate code program header\n"));
fprintf (file, _("\
-z noseparate-code Don't create separate code program header (default)\n"));
+#endif
fprintf (file, _("\
-z common Generate common symbols with STT_COMMON type\n"));
fprintf (file, _("\
--
2.17.1