[binutils-gdb/binutils-2_31-branch] ld: Properly display default for -z separate-code

H.J.Lu hjl@sourceware.org
Wed Jul 4 13:57:00 GMT 2018


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b6a63da464dc9d9a11b6d5c88eed30f327d1ed32

commit b6a63da464dc9d9a11b6d5c88eed30f327d1ed32
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jul 4 06:22:40 2018 -0700

    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.
    
    (cherry picked from commit b14b7ff14ffe911ec562004304841cf7d2775a19)

Diff:
---
 ld/ChangeLog | 6 ++++++
 ld/lexsup.c  | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 2be57eb..23fc838 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,11 @@
 2018-07-04  H.J. Lu  <hongjiu.lu@intel.com>
 
+	PR ld/23358
+	* lexsup.c (elf_shlib_list_options): Properly display default
+	for -z separate-code.
+
+2018-07-04  H.J. Lu  <hongjiu.lu@intel.com>
+
 	PR ld/23324
 	* testsuite/ld-x86-64/pr23324.s: New file.
 	* testsuite/ld-x86-64/pr23324a.d: Likewise.
diff --git a/ld/lexsup.c b/ld/lexsup.c
index a4bc7da..86a033a 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, _("\



More information about the Binutils-cvs mailing list