Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108595197
D28130.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28130.diff
View Options
diff --git a/usr.bin/elfctl/elfctl.1 b/usr.bin/elfctl/elfctl.1
--- a/usr.bin/elfctl/elfctl.1
+++ b/usr.bin/elfctl/elfctl.1
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 1, 2020
+.Dd January 12, 2021
.Dt ELFCTL 1
.Os
.Sh NAME
@@ -35,6 +35,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl h | Fl -help
+.Op Fl i
.Op Fl l
.Op Fl e Ar featurelist
.Ar
@@ -47,6 +48,9 @@
.Bl -tag -width indent
.It Fl h | Fl -help
Print a usage message and exit.
+.It Fl i
+Ignore unknown feature flags in
+.Ar featurelist .
.It Fl l
List known ELF feature flags.
.It Fl e Ar featurelist
diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c
--- a/usr.bin/elfctl/elfctl.c
+++ b/usr.bin/elfctl/elfctl.c
@@ -81,7 +81,9 @@
#else
#define SUPPORTED_ENDIAN ELFDATA2MSB
#endif
-
+
+static bool iflag;
+
int
main(int argc, char **argv)
{
@@ -100,8 +102,11 @@
if (elf_version(EV_CURRENT) == EV_NONE)
errx(EXIT_FAILURE, "elf_version error");
- while ((ch = getopt_long(argc, argv, "hle:", long_opts, NULL)) != -1) {
+ while ((ch = getopt_long(argc, argv, "hile:", long_opts, NULL)) != -1) {
switch (ch) {
+ case 'i':
+ iflag = true;
+ break;
case 'l':
print_features();
lflag = true;
@@ -197,6 +202,7 @@
Set or display the control features for an ELF object.\n\n\
Supported options are:\n\
-l List known control features.\n\
+ -i Ignore unknown features.\n\
-e [+-=]feature,list Edit features from a comma separated list.\n\
-h | --help Print a usage message and exit.\n"
@@ -229,7 +235,8 @@
}
if (i == len) {
warnx("%s is not a valid feature", feature);
- return (false);
+ if (!iflag)
+ return (false);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 6:24 PM (7 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16204249
Default Alt Text
D28130.diff (1 KB)
Attached To
Mode
D28130: elftcl: add -i flag to ignore unknown flags
Attached
Detach File
Event Timeline
Log In to Comment