This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Check DEFAULT_LD_Z_RELRO for -z relro help message


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

commit da4463c7d74ca0314fcab31f4a98dca3fd98e250
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jun 24 05:21:43 2016 -0700

    Check DEFAULT_LD_Z_RELRO for -z relro help message
    
    	* lexsup.c (elf_shlib_list_options): Check DEFAULT_LD_Z_RELRO
    	for -z relro help message.

Diff:
---
 ld/ChangeLog | 6 ++++++
 ld/lexsup.c  | 9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index da0c79c..e829529 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-24  Dilyan Palauzov <dilyan.palauzov@aegee.org>
+	    H.J. Lu  <hongjiu.lu@intel.com>
+
+	* lexsup.c (elf_shlib_list_options): Check DEFAULT_LD_Z_RELRO
+	for -z relro help message.
+
 2016-06-22  Maciej W. Rozycki  <macro@imgtec.com>
 
 	* testsuite/ld-mips-elf/undefweak-overflow.d: Use wildcard
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 6e0f932..7f8146c 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -1754,10 +1754,17 @@ elf_shlib_list_options (FILE *file)
   fprintf (file, _("\
   -z origin                   Mark object requiring immediate $ORIGIN\n\
 				processing at runtime\n"));
+#if DEFAULT_LD_Z_RELRO
   fprintf (file, _("\
-  -z relro                    Create RELRO program header\n"));
+  -z relro                    Create RELRO program header (default)\n"));
   fprintf (file, _("\
   -z norelro                  Don't create RELRO program header\n"));
+#else
+  fprintf (file, _("\
+  -z relro                    Create RELRO program header\n"));
+  fprintf (file, _("\
+  -z norelro                  Don't create RELRO program header (default)\n"));
+#endif
   fprintf (file, _("\
   -z common                   Generate common symbols with STT_COMMON type\n"));
   fprintf (file, _("\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]