Index: elf.5 =================================================================== --- elf.5 (revision 359244) +++ elf.5 (working copy) @@ -1277,25 +1277,50 @@ stored into the relocatable field. .El .Ss Note Section -ELF note sections consist of entries with the following format. -.Bl -column -offset indent "Field" "Size" "Description" -.It Sy Field Ta Sy Size Ta Sy Description -.It namesz Ta 32 bits Ta Size of "name" -.It descsz Ta 32 bits Ta Size of "desc" -.It type Ta 32 bits Ta OS-dependent note type -.It name Ta namesz Ta Null-terminated originator name -.It desc Ta descsz Ta OS-dependent note data +ELF note sections consist of entries with the following format: +.Bl -column -offset indent "namesz" "32 bits" "Null-terminated originator name" +.Sy Field Ta Sy Size Ta Sy Description +.It Em namesz Ta 32 bits Ta Size of "name" +.It Em descsz Ta 32 bits Ta Size of "desc" +.It Em type Ta 32 bits Ta OS-dependent note type +.It Em name Ta Em namesz Ta Null-terminated originator name +.It Em desc Ta Em descsz Ta OS-dependent note data .El .Pp The -.Sy name +.Em name and -.Sy desc +.Em desc fields are padded to ensure 4-byte alignemnt. -.Sy namesz +.Em namesz and -.Sy descsz +.Em descsz specify the unpadded length. +.Pp +.Fx defines the following ELF note types +.Po with corresponding interpretation of +.Em desc Pc : +.Bl -tag -width 4n +.It Dv NT_FREEBSD_ABI_TAG Pq Value: 1 +Indicates the OS ABI version in a form of a 32-bit integer containing expected +ABI version +.Po i.e., +.Dv __FreeBSD_version Pc . +.It Dv NT_FREEBSD_NOINIT_TAG Pq Value: 2 +Indicates that crt does not call init. +.Em desc +is ignored. +.It Dv NT_FREEBSD_ARCH_TAG Pq Value: 3 +.It Dv NT_FREEBSD_FEATURE_CTL Pq Value: 4 +Contains a bitmask of mitigations and features to enable: +.Bl -column "NT_FREEBSD_FCTL_PROTMAX_DISABLE" "0x00" "Disable implicit PROT_MAX" +.Sy Name Ta Sy Value Ta Sy Description +.It NT_FREEBSD_FCTL_ASLR_DISABLE Ta 0x01 Ta Disable ASLR +.It NT_FREEBSD_FCTL_PROTMAX_DISABLE Ta 0x02 Ta Disable implicit PROT_MAX +.It NT_FREEBSD_FCTL_STKGAP_DISABLE Ta 0x04 Ta Disable stack gap +.It NT_FREEBSD_FCTL_WXNEEDED Ta 0x08 Ta Binary makes W+X mappings +.El +.El .Sh SEE ALSO .Xr as 1 , .Xr gdb 1 ,