This is the mail archive of the binutils@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]

PR/20346 - make gold --help print whether "-z relro" is the default


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)"));


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