--- man5/elf.5 +++ man5/elf.5 @@ -584,6 +584,11 @@ Values less than or equal to .Sy PT_LOPROC are reserved for processor-specific semantics. +.It PT_GNU_STACK +GNU extension which is used by the Linux kernel to control the state of the +stack via the flags set in the +.Sy p_flags +member. .El .Pp .It Dv p_offset @@ -606,7 +611,7 @@ This member holds the number of bytes in the memory image of the segment. It may be zero. .It Dv p_flags -This member holds flags relevant to the segment: +This member holds a bitmask of flags relevant to the segment: .Pp .Bl -tag -width "PF_X" -compact .It Dv PF_X @@ -998,6 +1003,25 @@ .Sy SHF_ALLOC and .Sy SHF_EXECINSTR . +.It .gnu.version +This section holds the version symbol table, an array of ElfN_Half elements. +This section is of type +.Sy SHT_GNU_versym . +The attribute type used is +.Sy SHF_ALLOC . +.It .gnu.version_d +This section holds the version symbol definitons, a table of ElfN_Verdef +structures. This section is of type +.Sy SHT_GNU_verdef . +The attribute type used is +.Sy SHF_ALLOC . +.It .gnu.version_r +This section holds the version symbol needed elements, a table of +ElfN_Verneed structures. This section is of +type +.Sy SHT_GNU_versym . +The attribute type used is +.Sy SHF_ALLOC . .It .got This section holds the global offset table. This section is of type @@ -1049,6 +1073,14 @@ .Sy .note.openbsd.ident section to identify themselves, for the kernel to bypass any compatibility ELF binary emulation tests when loading the file. +.It .note.GNU-stack +This section is used in Linux object files for declaring stack attributes. +This section is of type +.Sy SHT_PROGBITS . +The only attribute used is +.Sy SHF_EXECINSTR . +This indicates to the GNU linker that the object file requires an +executable stack. .It .plt This section holds the procedure linkage table. This section is of type @@ -1271,7 +1301,23 @@ .El .Pp .It Dv st_other -This member currently holds zero and has no defined meaning. +This member defines the symbol visibility. +.Bl -tag -width "STV_PROTECTED" +.It Dv STV_DEFAULT +Default symbol visibility rules. +.It Dv STV_INTERNAL +Processor specific hidden class. +.It Dv STV_HIDDEN +Symbol is unavailable in other modules. +.It Dv STV_PROTECTED +Not preemptible, not exported. +.Pp +There are macros for extracting the visibility type: +.Pp +.Fn ELF32_ST_VISIBILITY other +or +.Fn ELF64_ST_VISIBILITY other +.El .It Dv st_shndx Every symbol table entry is .Dq defined