Document:

- new p_flag: PT_GNU_STACK
- new sections: .gnu.version .gnu.version_d .gnu.version_r
  .note.GNU-stack
- new structures: ElfN_Verdef ElfN_Verdaux ElfN_Verneed ElfN_Vernaux
This commit is contained in:
Michael Kerrisk 2007-09-23 17:26:09 +00:00
parent 01a734ef2b
commit dbdab2f481
1 changed files with 52 additions and 3 deletions

View File

@ -27,8 +27,9 @@
.\"
.\" Slightly adapted - aeb, 2004-01-01
.\" 2005-07-15, Mike Frysinger <vapier@gentoo.org>, various fixes
.\" 2007-10-11, Mike Frysinger <vapier@gentoo.org>, various fixes
.\"
.Dd July 31, 1999
.Dd October 11, 2007
.Dt ELF 5
.Os
.Sh NAME
@ -585,6 +586,11 @@ are reserved for processor-specific semantics.
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
@ -607,7 +613,7 @@ It may be zero.
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
@ -999,6 +1005,25 @@ The attributes used are
.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
@ -1050,6 +1075,14 @@ native executables usually contain a
.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
@ -1273,7 +1306,23 @@ convert a binding and a type into an st_info value.
.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