This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR/20346 - make gold --help print whether "-z relro" is the default
- From: Дилян Палаузов <dilyan dot palauzov at aegee dot org>
- To: binutils at sourceware dot org
- Date: Sun, 24 Jul 2016 21:17:59 +0200
- Subject: PR/20346 - make gold --help print whether "-z relro" is the default
- Authentication-results: sourceware.org; auth=none
- Authentication-results: aegeeserv.aegee.org; auth=pass (PLAIN) smtp.auth=didopalauzov
- Authentication-results: mail.aegee.org; dkim=none
- Dkim-filter: OpenDKIM Filter v2.10.3 mail.aegee.org u6OJDBMF024433
Please apply the following snippet, so that "gold --help" prints whether "-z relro" is enabled by default.
diff --git a/gold/options.h b/gold/options.h
index 23c9658..bfed05c 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1337,8 +1337,13 @@ class General_options
N_("Mark DSO to indicate that needs immediate $ORIGIN "
"processing at runtime"), NULL);
DEFINE_bool(relro, options::DASH_Z, '\0', DEFAULT_LD_Z_RELRO,
- N_("Where possible mark variables read-only after relocation"),
+#if DEFAULT_LD_Z_RELRO
+ N_("Where possible mark variables read-only after relocation (default)"),
N_("Don't mark variables read-only after relocation"));
+#else
+ N_("Where possible mark variables read-only after relocation"),
+ N_("Don't mark variables read-only after relocation (default)"));
+#endif
DEFINE_bool(text, options::DASH_Z, '\0', false,
N_("Do not permit relocations in read-only segments"),
N_("Permit relocations in read-only segments (default)"));