errorHandler().errorHandlingScript =
args.getLastArgValue(OPT_error_handling_script);
- config->executeOnly =
- args.hasFlag(OPT_execute_only, OPT_no_execute_only, false);
config->exportDynamic =
args.hasFlag(OPT_export_dynamic, OPT_no_export_dynamic, false);
config->filterList = args::getStrings(args, OPT_filter);
args.hasFlag(OPT_toc_optimize, OPT_no_toc_optimize, m == EM_PPC64);
config->pcRelOptimize =
args.hasFlag(OPT_pcrel_optimize, OPT_no_pcrel_optimize, m == EM_PPC64);
+
+ config->executeOnly = false;
+#ifdef __OpenBSD__
+ switch (m) {
+ case EM_AARCH64:
+ case EM_RISCV:
+ config->executeOnly = true;
+ break;
+ }
+#endif
+ config->executeOnly =
+ args.hasFlag(OPT_execute_only, OPT_no_execute_only, config->executeOnly);
}
// Returns a value of "-format" option.
followed by the name of the undefined symbol.
.It Fl -execute-only
Mark executable sections unreadable.
-This option is currently only supported on AArch64.
+This option is currently only supported on AArch64 and RISC-V.
.It Fl -exclude-libs Ns = Ns Ar value
Exclude static libraries from automatic export.
.It Fl -export-dynamic , Fl E