elf_common: add GNU note types and NT_GNU_PROPERTY_TYPE_0 bits

To support Intel CET IBT/Shadow Stack.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2019-06-04 15:44:31 +00:00
parent 004caac2d8
commit b734222edd

View File

@ -785,6 +785,21 @@ typedef struct {
#define NT_X86_XSTATE 0x202 /* x86 XSAVE extended state. */
#define NT_ARM_VFP 0x400 /* ARM VFP registers */
/* GNU note types. */
#define NT_GNU_ABI_TAG 1
#define NT_GNU_HWCAP 2
#define NT_GNU_BUILD_ID 3
#define NT_GNU_GOLD_VERSION 4
#define NT_GNU_PROPERTY_TYPE_0 5
#define GNU_PROPERTY_LOPROC 0xc0000000
#define GNU_PROPERTY_HIPROC 0xdfffffff
#define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002
#define GNU_PROPERTY_X86_FEATURE_1_IBT 0x00000001
#define GNU_PROPERTY_X86_FEATURE_1_SHSTK 0x00000002
/* Symbol Binding - ELFNN_ST_BIND - st_info */
#define STB_LOCAL 0 /* Local symbol */
#define STB_GLOBAL 1 /* Global symbol */