PR/20346 - make gold --help print whether "-z relro" is the default
Дилян Палаузов
dilyan.palauzov@aegee.org
Sun Jul 24 19:13:00 GMT 2016
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)"));
More information about the Binutils
mailing list