elfedit: Report unknown x86 feature

Report unknown x86 feature:

$ ./elfedit --disable-x86-feature foo a.out
elfedit: Error: Unknown x86 feature: foo
$

	* elfedit.c (elf_x86_feature): Report unknown x86 feature.
This commit is contained in:
H.J. Lu 2019-10-25 15:13:21 -07:00
parent 256878f318
commit 760ddef46d
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2019-10-25 H.J. Lu <hongjiu.lu@intel.com>
* elfedit.c (elf_x86_feature): Report unknown x86 feature.
2019-10-25 H.J. Lu <hongjiu.lu@intel.com>
* elfedit.c (update_gnu_property): Replace BYTE_PUT with byte_put.

View File

@ -260,7 +260,10 @@ elf_x86_feature (const char *feature, int enable)
else if (strcasecmp (feature, "shstk") == 0)
x86_feature = GNU_PROPERTY_X86_FEATURE_1_SHSTK;
else
return -1;
{
error (_("Unknown x86 feature: %s\n"), feature);
return -1;
}
if (enable)
{