Define NT_FREEBSD_FEATURE_CTL ELF note type

This ELF note will be used to allow binaries to opt out of, or in to,
upcoming vulnerability mitigation and other features.

Committing the definition and readelf change separately to allow
independent MFC.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2018-11-02 19:02:03 +00:00
parent e37480d938
commit e74f411d47
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340076
2 changed files with 2 additions and 0 deletions

View File

@ -1121,6 +1121,7 @@ note_type_freebsd(unsigned int nt)
case 1: return "NT_FREEBSD_ABI_TAG";
case 2: return "NT_FREEBSD_NOINIT_TAG";
case 3: return "NT_FREEBSD_ARCH_TAG";
case 4: return "NT_FREEBSD_FEATURE_CTL";
default: return (note_type_unknown(nt));
}
}

View File

@ -759,6 +759,7 @@ typedef struct {
#define NT_FREEBSD_ABI_TAG 1
#define NT_FREEBSD_NOINIT_TAG 2
#define NT_FREEBSD_ARCH_TAG 3
#define NT_FREEBSD_FEATURE_CTL 4
/* Values for n_type. Used in core files. */
#define NT_PRSTATUS 1 /* Process status. */