elf.5: Document PN_XNUM extension

In linux-2.6.34-rc1, an ELF core extension was added; user-land tools
manipulating ELF core dump such as gdb and binutils has already been
modified before; so elf.5 needs to be modified accordingly.

You can follow information on the ELF extension via the LKML post:
http://lkml.org/lkml/2010/1/3/103
Date	Mon, 04 Jan 2010 10:06:07 +0900 (JST)
Subject	[RESEND][mmotm][PATCH v2, 0/5] elf coredump: Add extended numbering support

This Linux-specific extension was added in kernel 2.6.34.

Reviewed-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Daisuke HATAYAMA 2010-06-19 12:42:51 +02:00 committed by Michael Kerrisk
parent eed79eed5b
commit 6866d935b3
1 changed files with 75 additions and 1 deletions

View File

@ -546,6 +546,30 @@ in bytes.
If a file has no program header,
.IR e_phnum
holds the value zero.
.IP
If the number of entries in the program header table is larger than or equal to
.\" This is a Linux extension, added in Linux 2.6.34.
.BR PN_XNUM
(0xffff), this member holds
.BR PN_XNUM
(0xffff) and the real number of entries in the program header table is held
in the
.IR sh_info
member of the initial entry in section header table.
Otherwise, the
.IR sh_info
member of the initial entry contains the value zero.
.\" .Bl -tag -width "PN_XNUM"
.RS 12
.TP 9
.BR PN_XNUM
This is defined as 0xffff, the largest number
.IR e_phnum
can have, specifying where the actual number of program headers is assigned.
.PD
.RE
.\" .El
.IP
.TP
.IR e_shentsize
This member holds a sections header's size in bytes.
@ -564,6 +588,18 @@ If a file has no section
header table,
.IR e_shnum
holds the value of zero.
.IP
If the number of entries in the section header table is larger than or equal to
.BR SHN_LORESERVE
(0xff00),
.IR e_shnum
holds the value zero and the real number of entries in the section header
table is held in the
.IR sh_size
member of the initial entry in section header table.
Otherwise, the
.IR sh_size
member of the initial entry in the section header table holds the value zero.
.TP
.IR e_shstrndx
This member holds the section header table index of the entry associated
@ -571,6 +607,17 @@ with the section name string table.
If the file has no section name string
table, this member holds the value
.BR SHN_UNDEF .
.IP
If the index of section name string table section is larger than or equal to
.BR SHN_LORESERVE
(0xff00), this member holds
.BR SHN_XINDEX
(0xffff) and the real index of the section name string table section
is held in the
.IR sh_link
member of the initial entry in section header table. Otherwise, the
.IR sh_link
member of the initial entry in section header table contains the value zero.
.RS 12
.\" .Bl -tag -width "SHN_LORESERVE"
.TP 14
@ -844,7 +891,17 @@ holds the size in bytes of each entry.
.PP
A section header table index is a subscript into this array.
Some section
header table indices are reserved.
header table indices are reserved:
the initial entry and the indices between
.B SHN_LORESERVE
and
.BR SHN_HIRESERVE .
The initial entry is used in ELF extensions for
.IR e_phnum ,
.IR e_shnum
and
.IR e_strndx ;
in other cases, each field in the initial entry is set to zero.
An object file does not have sections for
these special indices:
.\" .Bl -tag -width "SHN_LORESERVE"
@ -1856,6 +1913,16 @@ This is automatically populated by the linker.
ELF first appeared in
System V.
The ELF format is an adopted standard.
.PP
The extensions for
.IR e_phnum ,
.IR e_shnum
and
.IR e_strndx
respectively are
Linux extensions.
Sun, BSD and AMD64 also support them; for further information,
look under SEE ALSO.
.\" .SH AUTHORS
.\" The original version of this manual page was written by
.\" .An Jeroen Ruigrok van der Werven
@ -1881,3 +1948,10 @@ Santa Cruz Operation,
Unix System Laboratories,
"Object Files",
.IR "Executable and Linking Format (ELF)" .
.PP
Sun Microsystems,
.IR "Linker and Libraries Guide" .
.PP
AMD64 ABI Draft,
.IR "System V Application Binary Interface AMD64 Architecture Processor Supplement" .
.PP