aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2021-01-13 18:08:31 +0000
committerEd Maste <emaste@FreeBSD.org>2021-01-14 20:09:13 +0000
commitc763f99d11fdc9641308124c4a030c90b6a7fdbb (patch)
tree35b58d0bf96fa27b41955cac5fa29cd44887dd0e
parent3dfcb70b6ae9bcb9fd6a66721bebdb8c6a53c329 (diff)
downloadsrc-c763f99d11fdc9641308124c4a030c90b6a7fdbb.tar.gz
src-c763f99d11fdc9641308124c4a030c90b6a7fdbb.zip
elfctl: prefix disable flags with "no"
Some ELF feature flags indicate a request to opt-out of some feature, for example NT_FREEBSD_FCTL_ASLR_DISABLE indicates that ASLR should be disabled for the tagged binary. Using "aslr" as the short name for the flag is confusing as it seems to indicate a request for ASLR to be enabled. Rename "noaslr", and make a similar change for other opt-out flags. Reviewed by: bapt, manu, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28139
-rw-r--r--usr.bin/elfctl/elfctl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c
index 570bdba2e2be..20a2c5b95444 100644
--- a/usr.bin/elfctl/elfctl.c
+++ b/usr.bin/elfctl/elfctl.c
@@ -62,13 +62,14 @@ struct ControlFeatures {
};
static struct ControlFeatures featurelist[] = {
- { "aslr", NT_FREEBSD_FCTL_ASLR_DISABLE, "Disable ASLR" },
- { "protmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE,
+ { "noaslr", NT_FREEBSD_FCTL_ASLR_DISABLE, "Disable ASLR" },
+ { "noprotmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE,
"Disable implicit PROT_MAX" },
- { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" },
+ { "nostackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" },
{ "wxneeded", NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" },
{ "la48", NT_FREEBSD_FCTL_LA48, "amd64: Limit user VA to 48bit" },
- { "aslrstkgap", NT_FREEBSD_FCTL_ASG_DISABLE, "Disable ASLR stack gap" },
+ { "noaslrstkgap", NT_FREEBSD_FCTL_ASG_DISABLE,
+ "Disable ASLR stack gap" },
};
static struct option long_opts[] = {