]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/elf.5
lround.3, proc.5: Reword to avoid use of "etc."
[thirdparty/man-pages.git] / man5 / elf.5
CommitLineData
8d5bf179
MK
1.\" $OpenBSD: elf.5,v 1.12 2003/10/27 20:23:58 jmc Exp $
2.\"Copyright (c) 1999 Jeroen Ruigrok van der Werven
3.\"All rights reserved.
4.\"
7c576f45 5.\" %%%LICENSE_START(PERMISSIVE_MISC)
8d5bf179
MK
6.\"Redistribution and use in source and binary forms, with or without
7.\"modification, are permitted provided that the following conditions
8.\"are met:
9.\"1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\"2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution.
14.\"
15.\"THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\"ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\"SUCH DAMAGE.
8ff7380d 26.\" %%%LICENSE_END
8d5bf179
MK
27.\"
28.\" $FreeBSD: src/share/man/man5/elf.5,v 1.21 2001/10/01 16:09:23 ru Exp $
29.\"
30.\" Slightly adapted - aeb, 2004-01-01
31.\" 2005-07-15, Mike Frysinger <vapier@gentoo.org>, various fixes
dbdab2f4 32.\" 2007-10-11, Mike Frysinger <vapier@gentoo.org>, various fixes
352bedee 33.\" 2007-12-08, mtk, Converted from mdoc to man macros
8d5bf179 34.\"
9a86ff91 35.TH ELF 5 2013-04-17 "Linux" "Linux Programmer's Manual"
3233d665
MK
36.SH NAME
37elf \- format of Executable and Linking Format (ELF) files
38.SH SYNOPSIS
39.nf
40.\" .B #include <elf_abi.h>
41.B #include <elf.h>
42.fi
43.SH DESCRIPTION
fea681da 44The header file
3233d665 45.I <elf.h>
fea681da
MK
46defines the format of ELF executable binary files.
47Amongst these files are
48normal executable files, relocatable object files, core files and shared
49libraries.
5ec60461 50.PP
fea681da
MK
51An executable file using the ELF file format consists of an ELF header,
52followed by a program header table or a section header table, or both.
53The ELF header is always at offset zero of the file.
54The program header
55table and the section header table's offset in the file are defined in the
56ELF header.
57The two tables describe the rest of the particularities of
58the file.
5ec60461 59.PP
fea681da
MK
60.\" Applications which wish to process ELF binary files for their native
61.\" architecture only should include
3233d665 62.\" .I <elf_abi.h>
fea681da
MK
63.\" in their source code.
64.\" These applications should need to refer to
65.\" all the types and structures by their generic names
3233d665 66.\" "Elf_xxx"
fea681da 67.\" and to the macros by
3233d665 68.\" ELF_xxx".
fea681da
MK
69.\" Applications written this way can be compiled on any architecture,
70.\" regardless of whether the host is 32-bit or 64-bit.
3233d665 71.\" .PP
fea681da
MK
72.\" Should an application need to process ELF files of an unknown
73.\" architecture, then the application needs to explicitly use either
3233d665 74.\" "Elf32_xxx"
fea681da 75.\" or
3233d665 76.\" "Elf64_xxx"
fea681da
MK
77.\" type and structure names.
78.\" Likewise, the macros need to be identified by
3233d665 79.\" "ELF32_xxx"
fea681da 80.\" or
3233d665
MK
81.\" "ELF64_xxx".
82.\" .PP
fea681da
MK
83This header file describes the above mentioned headers as C structures
84and also includes structures for dynamic sections, relocation sections and
85symbol tables.
5ec60461 86.PP
fea681da 87The following types are used for N-bit architectures (N=32,64,
969c00ce
MK
88.I ElfN
89stands for
90.I Elf32
91or
92.IR Elf64 ,
93.I uintN_t
94stands for
95.I uint32_t
96or
97.IR uint64_t ):
088a639b 98.in +4n
3233d665
MK
99.nf
100
101ElfN_Addr Unsigned program address, uintN_t
102ElfN_Off Unsigned file offset, uintN_t
103ElfN_Section Unsigned section index, uint16_t
104ElfN_Versym Unsigned version symbol information, uint16_t
105Elf_Byte unsigned char
106ElfN_Half uint16_t
107ElfN_Sword int32_t
108ElfN_Word uint32_t
109ElfN_Sxword int64_t
110ElfN_Xword uint64_t
fea681da 111.\" Elf32_Size Unsigned object size
3233d665
MK
112.fi
113.in
5ec60461 114.PP
c13182ef 115(Note: The *BSD terminology is a bit different.
969c00ce
MK
116There
117.I Elf64_Half
118is
119twice as large as
120.IR Elf32_Half ,
121and
122.I Elf64Quarter
123is used for
124.IR uint16_t .
fea681da
MK
125In order to avoid confusion these types are replaced by explicit ones
126in the below.)
5ec60461 127.PP
fea681da 128All data structures that the file format defines follow the
3233d665 129"natural"
fea681da
MK
130size and alignment guidelines for the relevant class.
131If necessary,
132data structures contain explicit padding to ensure 4-byte alignment
133for 4-byte objects, to force structure sizes to a multiple of 4, etc.
5ec60461 134.PP
969c00ce
MK
135The ELF header is described by the type
136.I Elf32_Ehdr
137or
138.IR Elf64_Ehdr :
088a639b 139.in +4n
3233d665
MK
140.nf
141
fea681da
MK
142#define EI_NIDENT 16
143
144typedef struct {
dd0a09a5
MK
145 unsigned char e_ident[EI_NIDENT];
146 uint16_t e_type;
147 uint16_t e_machine;
148 uint32_t e_version;
149 ElfN_Addr e_entry;
150 ElfN_Off e_phoff;
151 ElfN_Off e_shoff;
152 uint32_t e_flags;
153 uint16_t e_ehsize;
154 uint16_t e_phentsize;
155 uint16_t e_phnum;
156 uint16_t e_shentsize;
157 uint16_t e_shnum;
158 uint16_t e_shstrndx;
fea681da 159} ElfN_Ehdr;
3233d665
MK
160.fi
161.in
5ec60461 162.PP
fea681da 163The fields have the following meanings:
3233d665
MK
164.\" .Bl -tag -width "e_phentsize"
165.TP 12
166.IR e_ident
8d5bf179
MK
167This array of bytes specifies to interpret the file,
168independent of the processor or the file's remaining contents.
169Within this array everything is named by macros, which start with
170the prefix
3233d665 171.BR EI_
8d5bf179 172and may contain values which start with the prefix
3233d665 173.BR ELF .
8d5bf179 174The following macros are defined:
3233d665
MK
175.RS 12
176.\" .Bl -tag -width "EI_VERSION" \" EI_ABIVERSION
177.TP 12
178.BR EI_MAG0
8d5bf179
MK
179The first byte of the magic number.
180It must be filled with
3233d665 181.BR ELFMAG0 .
8d5bf179 182(0: 0x7f)
3233d665
MK
183.TP
184.BR EI_MAG1
8d5bf179
MK
185The second byte of the magic number.
186It must be filled with
3233d665 187.BR ELFMAG1 .
f81fb444 188(1: \(aqE\(aq)
3233d665
MK
189.TP
190.BR EI_MAG2
8d5bf179
MK
191The third byte of the magic number.
192It must be filled with
3233d665 193.BR ELFMAG2 .
f81fb444 194(2: \(aqL\(aq)
3233d665
MK
195.TP
196.BR EI_MAG3
8d5bf179
MK
197The fourth byte of the magic number.
198It must be filled with
3233d665 199.BR ELFMAG3 .
f81fb444 200(3: \(aqF\(aq)
3233d665
MK
201.TP
202.BR EI_CLASS
8d5bf179 203The fifth byte identifies the architecture for this binary:
3233d665
MK
204.RS 12
205.\" .Bl -tag -width "ELFCLASSNONE" -compact
206.TP 14
5ec60461 207.PD 0
3233d665 208.BR ELFCLASSNONE
8d5bf179 209This class is invalid.
3233d665
MK
210.TP
211.BR ELFCLASS32
8d5bf179
MK
212This defines the 32-bit architecture.
213It supports machines with files
214and virtual address spaces up to 4 Gigabytes.
3233d665
MK
215.TP
216.BR ELFCLASS64
8d5bf179 217This defines the 64-bit architecture.
5ec60461 218.PD
3233d665
MK
219.RE
220.\" .El
221.TP
222.BR EI_DATA
8d5bf179
MK
223The sixth byte specifies the data encoding of the processor-specific
224data in the file.
225Currently these encodings are supported:
3233d665
MK
226.\" .Bl -tag -width "ELFDATA2LSB" -compact
227.RS 12
228.TP 14
5ec60461 229.PD 0
3233d665 230.BR ELFDATANONE
8d5bf179 231Unknown data format.
3233d665
MK
232.TP
233.BR ELFDATA2LSB
8d5bf179 234Two's complement, little-endian.
3233d665
MK
235.TP
236.BR ELFDATA2MSB
8d5bf179 237Two's complement, big-endian.
5ec60461 238.PD
3233d665
MK
239.RE
240.\" .El
241.TP
5ec60461 242.PD 0
3233d665 243.BR EI_VERSION
7e8740ae 244The seventh byte is the version number of the ELF specification:
3233d665
MK
245.\" .Bl -tag -width "EV_CURRENT" -compact
246.RS 12
247.TP 14
248.BR EV_NONE
8d5bf179 249Invalid version.
3233d665
MK
250.TP
251.BR EV_CURRENT
8d5bf179 252Current version.
5ec60461 253.PD
3233d665
MK
254.RE
255.\".El
256.TP
257.BR EI_OSABI
7e8740ae 258The eighth byte identifies the operating system
8d5bf179
MK
259and ABI to which the object is targeted.
260Some fields in other ELF structures have flags
e2badfdf 261and values that have platform-specific meanings;
8d5bf179
MK
262the interpretation of those fields is determined by the value of this byte.
263E.g.:
3233d665
MK
264.\" .Bl -tag -width "ELFOSABI_STANDALONE" -compact
265.RS 12
266.TP 20
5ec60461 267.PD 0
3233d665 268.BR ELFOSABI_NONE
8d5bf179
MK
269Same as ELFOSABI_SYSV
270.\" 0
3233d665
MK
271.TP
272.BR ELFOSABI_SYSV
8d5bf179
MK
273UNIX System V ABI.
274.\" 0
275.\" synonym: ELFOSABI_NONE
3233d665
MK
276.TP
277.BR ELFOSABI_HPUX
8d5bf179
MK
278HP-UX ABI.
279.\" 1
3233d665
MK
280.TP
281.BR ELFOSABI_NETBSD
8d5bf179
MK
282NetBSD ABI.
283.\" 2
3233d665
MK
284.TP
285.BR ELFOSABI_LINUX
8d5bf179
MK
286Linux ABI.
287.\" 3
3233d665
MK
288.\" .TP
289.\" .BR ELFOSABI_HURD
8d5bf179
MK
290.\" Hurd ABI.
291.\" 4
3233d665
MK
292.\" .TP
293.\" .BR ELFOSABI_86OPEN
8d5bf179
MK
294.\" 86Open Common IA32 ABI.
295.\" 5
3233d665
MK
296.TP
297.BR ELFOSABI_SOLARIS
8d5bf179
MK
298Solaris ABI.
299.\" 6
3233d665
MK
300.\" .TP
301.\" .BR ELFOSABI_MONTEREY
4175f999
MK
302.\" Monterey project ABI.
303.\" Now replaced by
8d5bf179
MK
304.\" ELFOSABI_AIX
305.\" 7
3233d665
MK
306.TP
307.BR ELFOSABI_IRIX
8d5bf179
MK
308IRIX ABI.
309.\" 8
3233d665
MK
310.TP
311.BR ELFOSABI_FREEBSD
8d5bf179
MK
312FreeBSD ABI.
313.\" 9
3233d665
MK
314.TP
315.BR ELFOSABI_TRU64
8d5bf179
MK
316TRU64 UNIX ABI.
317.\" 10
318.\" ELFOSABI_MODESTO
319.\" 11
320.\" ELFOSABI_OPENBSD
321.\" 12
3233d665
MK
322.TP
323.BR ELFOSABI_ARM
8d5bf179
MK
324ARM architecture ABI.
325.\" 97
3233d665
MK
326.TP
327.BR ELFOSABI_STANDALONE
8d5bf179
MK
328Stand-alone (embedded) ABI.
329.\" 255
3233d665 330.\" .El
5ec60461 331.PD
3233d665
MK
332.RE
333.TP
334.BR EI_ABIVERSION
7e8740ae 335The ninth byte identifies the version of the ABI
8d5bf179
MK
336to which the object is targeted.
337This field is used to distinguish among incompatible versions of an ABI.
338The interpretation of this version number
db4163b1
MK
339is dependent on the ABI identified by the
340.B EI_OSABI
341field.
8d5bf179 342Applications conforming to this specification use the value 0.
3233d665
MK
343.TP
344.BR EI_PAD
8d5bf179
MK
345Start of padding.
346These bytes are reserved and set to zero.
347Programs
348which read them should ignore them.
db4163b1
MK
349The value for
350.B EI_PAD
351will change in
8d5bf179 352the future if currently unused bytes are given meanings.
4e836144 353.\" As reported by Yuri Kozlov and confirmed by Mike Frysinger, EI_BRAND is
b520dffc
MK
354.\" not in GABI (http://www.sco.com/developers/gabi/latest/ch4.eheader.html)
355.\" It looks to be a BSDism
356.\" .TP
357.\" .BR EI_BRAND
358.\" Start of architecture identification.
3233d665
MK
359.TP
360.BR EI_NIDENT
db4163b1
MK
361The size of the
362.I e_ident
363array.
3233d665
MK
364.\" .El
365.RE
366.TP
367.IR e_type
8d5bf179 368This member of the structure identifies the object file type:
3233d665
MK
369.RS 12
370.\" .Bl -tag -width "ET_NONE" -compact
371.TP 12
5ec60461 372.PD 0
3233d665 373.BR ET_NONE
8d5bf179 374An unknown type.
3233d665
MK
375.TP
376.BR ET_REL
8d5bf179 377A relocatable file.
3233d665
MK
378.TP
379.BR ET_EXEC
8d5bf179 380An executable file.
3233d665
MK
381.TP
382.BR ET_DYN
8d5bf179 383A shared object.
3233d665
MK
384.TP
385.BR ET_CORE
8d5bf179 386A core file.
5ec60461 387.PD
3233d665 388.RE
3233d665
MK
389.\" .El
390.TP
391.IR e_machine
8d5bf179
MK
392This member specifies the required architecture for an individual file.
393E.g.:
3233d665
MK
394.RS 12
395.\" .Bl -tag -width "EM_MIPS_RS4_BE" -compact
396.TP 12
5ec60461 397.PD 0
3233d665 398.BR EM_NONE
8d5bf179
MK
399An unknown machine.
400.\" 0
3233d665
MK
401.TP
402.BR EM_M32
8d5bf179
MK
403AT&T WE 32100.
404.\" 1
3233d665
MK
405.TP
406.BR EM_SPARC
8d5bf179
MK
407Sun Microsystems SPARC.
408.\" 2
3233d665
MK
409.TP
410.BR EM_386
8d5bf179
MK
411Intel 80386.
412.\" 3
3233d665
MK
413.TP
414.BR EM_68K
8d5bf179
MK
415Motorola 68000.
416.\" 4
3233d665
MK
417.TP
418.BR EM_88K
8d5bf179
MK
419Motorola 88000.
420.\" 5
3233d665
MK
421.\" .TP
422.\" .BR EM_486
8d5bf179
MK
423.\" Intel 80486.
424.\" 6
3233d665
MK
425.TP
426.BR EM_860
8d5bf179
MK
427Intel 80860.
428.\" 7
3233d665
MK
429.TP
430.BR EM_MIPS
8d5bf179
MK
431MIPS RS3000 (big-endian only).
432.\" 8
433.\" EM_S370
434.\" 9
3233d665
MK
435.\" .TP
436.\" .BR EM_MIPS_RS4_BE
8d5bf179
MK
437.\" MIPS RS4000 (big-endian only). Deprecated.
438.\" 10
439.\" EM_MIPS_RS3_LE (MIPS R3000 little-endian)
440.\" 10
3233d665
MK
441.TP
442.BR EM_PARISC
8d5bf179
MK
443HP/PA.
444.\" 15
3233d665
MK
445.TP
446.BR EM_SPARC32PLUS
8d5bf179
MK
447SPARC with enhanced instruction set.
448.\" 18
3233d665
MK
449.TP
450.BR EM_PPC
8d5bf179
MK
451PowerPC.
452.\" 20
3233d665
MK
453.TP
454.BR EM_PPC64
8d5bf179
MK
455PowerPC 64-bit.
456.\" 21
3233d665
MK
457.TP
458.BR EM_S390
8d5bf179
MK
459IBM S/390
460.\" 22
3233d665
MK
461.TP
462.BR EM_ARM
8d5bf179
MK
463Advanced RISC Machines
464.\" 40
3233d665
MK
465.TP
466.BR EM_SH
8d5bf179
MK
467Renesas SuperH
468.\" 42
3233d665
MK
469.TP
470.BR EM_SPARCV9
8d5bf179
MK
471SPARC v9 64-bit.
472.\" 43
3233d665
MK
473.TP
474.BR EM_IA_64
8d5bf179
MK
475Intel Itanium
476.\" 50
3233d665
MK
477.TP
478.BR EM_X86_64
8d5bf179
MK
479AMD x86-64
480.\" 62
3233d665
MK
481.TP
482.BR EM_VAX
8d5bf179
MK
483DEC Vax.
484.\" 75
485.\" EM_CRIS
486.\" 76
3233d665
MK
487.\" .TP
488.\" .BR EM_ALPHA
8d5bf179 489.\" Compaq [DEC] Alpha.
3233d665
MK
490.\" .TP
491.\" .BR EM_ALPHA_EXP
8d5bf179 492.\" Compaq [DEC] Alpha with enhanced instruction set.
5ec60461 493.PD
3233d665
MK
494.RE
495.\" .El
496.TP
497.IR e_version
8d5bf179 498This member identifies the file version:
3233d665
MK
499.\" .Bl -tag -width "EV_CURRENT" -compact
500.RS 12
501.TP 12
5ec60461 502.PD 0
3233d665 503.BR EV_NONE
8d5bf179 504Invalid version.
3233d665
MK
505.TP
506.BR EV_CURRENT
8d5bf179 507Current version.
3233d665 508.\" .El
5ec60461 509.PD
3233d665
MK
510.RE
511.TP
512.IR e_entry
8d5bf179
MK
513This member gives the virtual address to which the system first transfers
514control, thus starting the process.
515If the file has no associated entry
516point, this member holds zero.
3233d665
MK
517.TP
518.IR e_phoff
8d5bf179
MK
519This member holds the program header table's file offset in bytes.
520If
521the file has no program header table, this member holds zero.
3233d665
MK
522.TP
523.IR e_shoff
8d5bf179
MK
524This member holds the section header table's file offset in bytes.
525If the
526file has no section header table this member holds zero.
3233d665
MK
527.TP
528.IR e_flags
8d5bf179
MK
529This member holds processor-specific flags associated with the file.
530Flag names take the form EF_`machine_flag'.
531Currently no flags have been defined.
3233d665
MK
532.TP
533.IR e_ehsize
8d5bf179 534This member holds the ELF header's size in bytes.
3233d665
MK
535.TP
536.IR e_phentsize
8d5bf179
MK
537This member holds the size in bytes of one entry in the file's program header
538table; all entries are the same size.
3233d665
MK
539.TP
540.IR e_phnum
8d5bf179
MK
541This member holds the number of entries in the program header
542table.
543Thus the product of
3233d665 544.IR e_phentsize
8d5bf179 545and
3233d665 546.IR e_phnum
8d5bf179
MK
547gives the table's size
548in bytes.
549If a file has no program header,
3233d665 550.IR e_phnum
8d5bf179 551holds the value zero.
6866d935
DH
552.IP
553If the number of entries in the program header table is larger than or equal to
554.\" This is a Linux extension, added in Linux 2.6.34.
555.BR PN_XNUM
556(0xffff), this member holds
557.BR PN_XNUM
558(0xffff) and the real number of entries in the program header table is held
559in the
560.IR sh_info
561member of the initial entry in section header table.
562Otherwise, the
563.IR sh_info
564member of the initial entry contains the value zero.
565.\" .Bl -tag -width "PN_XNUM"
566.RS 12
567.TP 9
568.BR PN_XNUM
569This is defined as 0xffff, the largest number
570.IR e_phnum
571can have, specifying where the actual number of program headers is assigned.
572.PD
573.RE
574.\" .El
575.IP
3233d665
MK
576.TP
577.IR e_shentsize
8d5bf179
MK
578This member holds a sections header's size in bytes.
579A section header is one
580entry in the section header table; all entries are the same size.
3233d665
MK
581.TP
582.IR e_shnum
8d5bf179
MK
583This member holds the number of entries in the section header table.
584Thus
585the product of
3233d665 586.IR e_shentsize
8d5bf179 587and
3233d665 588.IR e_shnum
8d5bf179
MK
589gives the section header table's size in bytes.
590If a file has no section
591header table,
3233d665 592.IR e_shnum
8d5bf179 593holds the value of zero.
6866d935
DH
594.IP
595If the number of entries in the section header table is larger than or equal to
596.BR SHN_LORESERVE
597(0xff00),
598.IR e_shnum
599holds the value zero and the real number of entries in the section header
600table is held in the
601.IR sh_size
602member of the initial entry in section header table.
603Otherwise, the
604.IR sh_size
605member of the initial entry in the section header table holds the value zero.
3233d665
MK
606.TP
607.IR e_shstrndx
8d5bf179
MK
608This member holds the section header table index of the entry associated
609with the section name string table.
610If the file has no section name string
611table, this member holds the value
3233d665 612.BR SHN_UNDEF .
6866d935
DH
613.IP
614If the index of section name string table section is larger than or equal to
615.BR SHN_LORESERVE
616(0xff00), this member holds
617.BR SHN_XINDEX
618(0xffff) and the real index of the section name string table section
619is held in the
620.IR sh_link
4175f999
MK
621member of the initial entry in section header table.
622Otherwise, the
6866d935
DH
623.IR sh_link
624member of the initial entry in section header table contains the value zero.
3233d665
MK
625.RS 12
626.\" .Bl -tag -width "SHN_LORESERVE"
627.TP 14
628.BR SHN_UNDEF
8d5bf179
MK
629This value marks an undefined, missing, irrelevant, or otherwise meaningless
630section reference.
631For example, a symbol
3233d665 632"defined"
8d5bf179 633relative to section number
3233d665 634.BR SHN_UNDEF
8d5bf179 635is an undefined symbol.
3233d665
MK
636.TP
637.BR SHN_LORESERVE
8d5bf179 638This value specifies the lower bound of the range of reserved indices.
3233d665
MK
639.TP
640.BR SHN_LOPROC
8d5bf179 641Values greater than or equal to
3233d665 642.BR SHN_HIPROC
8d5bf179 643are reserved for processor-specific semantics.
3233d665
MK
644.TP
645.BR SHN_HIPROC
8d5bf179 646Values less than or equal to
3233d665 647.BR SHN_LOPROC
8d5bf179 648are reserved for processor-specific semantics.
3233d665
MK
649.TP
650.BR SHN_ABS
8d5bf179
MK
651This value specifies absolute values for the corresponding reference.
652For
653example, symbols defined relative to section number
3233d665 654.BR SHN_ABS
8d5bf179 655have absolute values and are not affected by relocation.
3233d665
MK
656.TP
657.BR SHN_COMMON
8d5bf179
MK
658Symbols defined relative to this section are common symbols, such as Fortran
659COMMON or unallocated C external variables.
3233d665
MK
660.TP
661.BR SHN_HIRESERVE
8d5bf179
MK
662This value specifies the upper bound of the range of reserved
663indices between
3233d665 664.BR SHN_LORESERVE
8d5bf179 665and
3233d665 666.BR SHN_HIRESERVE ,
8d5bf179
MK
667inclusive; the values do
668not reference the section header table.
669That is, the section header table
670does
3233d665 671.I not
8d5bf179 672contain entries for the reserved indices.
3233d665
MK
673.RE
674.\" .El
675.\" .El
676.PP
8d5bf179
MK
677An executable or shared object file's program header table is an array of
678structures, each describing a segment or other information the system needs
679to prepare the program for execution.
680An object file
3233d665 681.IR segment
8d5bf179 682contains one or more
3233d665 683.IR sections .
8d5bf179
MK
684Program headers are meaningful only for executable and shared object files.
685A file specifies its own program header size with the ELF header's
3233d665 686.IR e_phentsize
8d5bf179 687and
3233d665 688.IR e_phnum
8d5bf179 689members.
969c00ce
MK
690The ELF program header is described by the type
691.I Elf32_Phdr
692or
693.I Elf64_Phdr
8d5bf179 694depending on the architecture:
088a639b 695.in +4n
3233d665
MK
696.nf
697
8d5bf179 698typedef struct {
dd0a09a5
MK
699 uint32_t p_type;
700 Elf32_Off p_offset;
701 Elf32_Addr p_vaddr;
702 Elf32_Addr p_paddr;
703 uint32_t p_filesz;
704 uint32_t p_memsz;
705 uint32_t p_flags;
706 uint32_t p_align;
8d5bf179 707} Elf32_Phdr;
3233d665
MK
708.fi
709.in
088a639b 710.in +4n
3233d665
MK
711.nf
712
8d5bf179 713typedef struct {
dd0a09a5
MK
714 uint32_t p_type;
715 uint32_t p_flags;
716 Elf64_Off p_offset;
717 Elf64_Addr p_vaddr;
718 Elf64_Addr p_paddr;
719 uint64_t p_filesz;
720 uint64_t p_memsz;
721 uint64_t p_align;
8d5bf179 722} Elf64_Phdr;
3233d665
MK
723.fi
724.in
5ec60461 725.PP
8d5bf179
MK
726The main difference between the 32-bit and the 64-bit program header lies
727in the location of the
3233d665 728.IR p_flags
8d5bf179 729member in the total struct.
3233d665
MK
730.\" .Bl -tag -width "p_offset"
731.TP 12
732.IR p_type
8d5bf179
MK
733This member of the Phdr struct tells what kind of segment this array
734element describes or how to interpret the array element's information.
3233d665
MK
735.\" .Bl -tag -width "PT_DYNAMIC"
736.RS 12
737.TP 12
738.BR PT_NULL
8d5bf179
MK
739The array element is unused and the other members' values are undefined.
740This lets the program header have ignored entries.
3233d665
MK
741.TP
742.BR PT_LOAD
8d5bf179 743The array element specifies a loadable segment, described by
3233d665 744.IR p_filesz
8d5bf179 745and
3233d665 746.IR p_memsz .
8d5bf179
MK
747The bytes from the file are mapped to the beginning of the memory
748segment.
749If the segment's memory size
969c00ce 750.IR p_memsz
8d5bf179 751is larger than the file size
969c00ce 752.IR p_filesz ,
8d5bf179 753the
3233d665 754"extra"
8d5bf179
MK
755bytes are defined to hold the value 0 and to follow the segment's
756initialized area.
757The file size may not be larger than the memory size.
758Loadable segment entries in the program header table appear in ascending
759order, sorted on the
3233d665 760.IR p_vaddr
8d5bf179 761member.
3233d665
MK
762.TP
763.BR PT_DYNAMIC
8d5bf179 764The array element specifies dynamic linking information.
3233d665
MK
765.TP
766.BR PT_INTERP
8d5bf179 767The array element specifies the location and size of a null-terminated
2d7195b8 768pathname to invoke as an interpreter.
8d5bf179
MK
769This segment type is meaningful
770only for executable files (though it may occur for shared objects).
771However it may not occur more than once in a file.
772If it is present, it must precede any loadable segment entry.
3233d665
MK
773.TP
774.BR PT_NOTE
8d5bf179 775The array element specifies the location and size for auxiliary information.
3233d665
MK
776.TP
777.BR PT_SHLIB
8d5bf179
MK
778This segment type is reserved but has unspecified semantics.
779Programs that
780contain an array element of this type do not conform to the ABI.
3233d665
MK
781.TP
782.BR PT_PHDR
8d5bf179
MK
783The array element, if present, specifies the location and size of the program
784header table itself, both in the file and in the memory image of the program.
785This segment type may not occur more than once in a file.
786Moreover, it may
33a0ccb2 787occur only if the program header table is part of the memory image of the
8d5bf179
MK
788program.
789If it is present, it must precede any loadable segment entry.
3233d665
MK
790.TP
791.BR PT_LOPROC
8d5bf179 792Values greater than or equal to
3233d665 793.BR PT_HIPROC
8d5bf179 794are reserved for processor-specific semantics.
3233d665
MK
795.TP
796.BR PT_HIPROC
8d5bf179 797Values less than or equal to
3233d665 798.BR PT_LOPROC
8d5bf179 799are reserved for processor-specific semantics.
a9d82280 800.TP
3233d665 801.BR PT_GNU_STACK
dbdab2f4 802GNU extension which is used by the Linux kernel to control the state of the
38f76cd2 803stack via the flags set in the
3233d665 804.IR p_flags
dbdab2f4 805member.
3233d665
MK
806.\" .El
807.RE
808.TP
809.IR p_offset
8d5bf179
MK
810This member holds the offset from the beginning of the file at which
811the first byte of the segment resides.
3233d665
MK
812.TP
813.IR p_vaddr
8d5bf179
MK
814This member holds the virtual address at which the first byte of the
815segment resides in memory.
3233d665
MK
816.TP
817.IR p_paddr
8d5bf179
MK
818On systems for which physical addressing is relevant, this member is
819reserved for the segment's physical address.
820Under
3233d665 821BSD
8d5bf179
MK
822this member is
823not used and must be zero.
3233d665
MK
824.TP
825.IR p_filesz
8d5bf179
MK
826This member holds the number of bytes in the file image of the segment.
827It may be zero.
3233d665
MK
828.TP
829.IR p_memsz
8d5bf179
MK
830This member holds the number of bytes in the memory image of the segment.
831It may be zero.
3233d665
MK
832.TP
833.IR p_flags
f3ae1918 834This member holds a bit mask of flags relevant to the segment:
3233d665
MK
835.\" .Bl -tag -width "PF_X" -compact
836.RS 12
837.TP
5ec60461 838.PD 0
3233d665 839.BR PF_X
8d5bf179 840An executable segment.
3233d665
MK
841.TP
842.BR PF_W
8d5bf179 843A writable segment.
3233d665
MK
844.TP
845.BR PF_R
8d5bf179 846A readable segment.
5ec60461 847.PD
3233d665
MK
848.RE
849.\" .El
5ec60461 850.IP
8d5bf179 851A text segment commonly has the flags
3233d665 852.BR PF_X
8d5bf179 853and
3233d665 854.BR PF_R .
8d5bf179 855A data segment commonly has
3233d665
MK
856.BR PF_X ,
857.BR PF_W
8d5bf179 858and
3233d665
MK
859.BR PF_R .
860.TP
861.IR p_align
8d5bf179
MK
862This member holds the value to which the segments are aligned in memory
863and in the file.
864Loadable process segments must have congruent values for
3233d665 865.IR p_vaddr
8d5bf179 866and
3233d665 867.IR p_offset ,
8d5bf179
MK
868modulo the page size.
869Values of zero and one mean no alignment is required.
870Otherwise,
3233d665 871.IR p_align
8d5bf179 872should be a positive, integral power of two, and
3233d665 873.IR p_vaddr
8d5bf179 874should equal
3233d665 875.IR p_offset ,
8d5bf179 876modulo
3233d665
MK
877.IR p_align .
878.\" .El
5ec60461 879.PP
8d5bf179
MK
880A file's section header table lets one locate all the file's sections.
881The
969c00ce
MK
882section header table is an array of
883.I Elf32_Shdr
884or
885.I Elf64_Shdr
886structures.
8d5bf179
MK
887The
888ELF header's
3233d665 889.IR e_shoff
8d5bf179
MK
890member gives the byte offset from the beginning of the file to the section
891header table.
3233d665 892.IR e_shnum
8d5bf179 893holds the number of entries the section header table contains.
3233d665 894.IR e_shentsize
8d5bf179 895holds the size in bytes of each entry.
5ec60461 896.PP
8d5bf179
MK
897A section header table index is a subscript into this array.
898Some section
6866d935
DH
899header table indices are reserved:
900the initial entry and the indices between
901.B SHN_LORESERVE
902and
903.BR SHN_HIRESERVE .
904The initial entry is used in ELF extensions for
905.IR e_phnum ,
906.IR e_shnum
907and
908.IR e_strndx ;
909in other cases, each field in the initial entry is set to zero.
8d5bf179
MK
910An object file does not have sections for
911these special indices:
3233d665 912.\" .Bl -tag -width "SHN_LORESERVE"
888e0048 913.RS
3233d665
MK
914.TP 14
915.BR SHN_UNDEF
8d5bf179
MK
916This value marks an undefined, missing, irrelevant or otherwise meaningless
917section reference.
3233d665
MK
918.TP
919.BR SHN_LORESERVE
8d5bf179 920This value specifies the lower bound of the range of reserved indices.
3233d665
MK
921.TP
922.BR SHN_LOPROC
8d5bf179 923Values greater than or equal to
3233d665 924.BR SHN_HIPROC
8d5bf179 925are reserved for processor-specific semantics.
3233d665
MK
926.TP
927.BR SHN_HIPROC
8d5bf179 928Values less than or equal to
3233d665 929.BR SHN_LOPROC
8d5bf179 930are reserved for processor-specific semantics.
3233d665
MK
931.TP
932.BR SHN_ABS
8d5bf179
MK
933This value specifies the absolute value for the corresponding reference.
934For
935example, a symbol defined relative to section number
3233d665 936.BR SHN_ABS
8d5bf179 937has an absolute value and is not affected by relocation.
3233d665
MK
938.TP
939.BR SHN_COMMON
8d5bf179
MK
940Symbols defined relative to this section are common symbols, such as FORTRAN
941COMMON or unallocated C external variables.
3233d665
MK
942.TP
943.BR SHN_HIRESERVE
8d5bf179
MK
944This value specifies the upper bound of the range of reserved indices.
945The
946system reserves indices between
3233d665 947.BR SHN_LORESERVE
8d5bf179 948and
3233d665 949.BR SHN_HIRESERVE ,
8d5bf179
MK
950inclusive.
951The section header table does not contain entries for the
952reserved indices.
888e0048 953.RE
3233d665 954.\" .El
3233d665 955.PP
8d5bf179 956The section header has the following structure:
088a639b 957.in +4n
3233d665
MK
958.nf
959
8d5bf179 960typedef struct {
dd0a09a5
MK
961 uint32_t sh_name;
962 uint32_t sh_type;
963 uint32_t sh_flags;
964 Elf32_Addr sh_addr;
965 Elf32_Off sh_offset;
966 uint32_t sh_size;
967 uint32_t sh_link;
968 uint32_t sh_info;
969 uint32_t sh_addralign;
970 uint32_t sh_entsize;
8d5bf179 971} Elf32_Shdr;
3233d665
MK
972.fi
973.in
088a639b 974.in +4n
3233d665
MK
975.nf
976
8d5bf179 977typedef struct {
dd0a09a5
MK
978 uint32_t sh_name;
979 uint32_t sh_type;
980 uint64_t sh_flags;
981 Elf64_Addr sh_addr;
982 Elf64_Off sh_offset;
983 uint64_t sh_size;
984 uint32_t sh_link;
985 uint32_t sh_info;
986 uint64_t sh_addralign;
987 uint64_t sh_entsize;
8d5bf179 988} Elf64_Shdr;
3233d665
MK
989.fi
990.in
5ec60461 991.PP
8d5bf179 992No real differences exist between the 32-bit and 64-bit section headers.
3233d665 993.\" .Bl -tag -width "sh_addralign"
5ec60461 994.TP 10
3233d665 995.IR sh_name
8d5bf179
MK
996This member specifies the name of the section.
997Its value is an index
998into the section header string table section, giving the location of
999a null-terminated string.
3233d665
MK
1000.TP
1001.IR sh_type
8d5bf179 1002This member categorizes the section's contents and semantics.
3233d665 1003.\" .Bl -tag -width "SHT_PROGBITS"
5ec60461
MK
1004.RS 10
1005.TP 15
3233d665 1006.BR SHT_NULL
8d5bf179
MK
1007This value marks the section header as inactive.
1008It does not
1009have an associated section.
1010Other members of the section header
1011have undefined values.
3233d665
MK
1012.TP
1013.BR SHT_PROGBITS
8d5bf179
MK
1014This section holds information defined by the program, whose
1015format and meaning are determined solely by the program.
3233d665
MK
1016.TP
1017.BR SHT_SYMTAB
8d5bf179
MK
1018This section holds a symbol table.
1019Typically,
3233d665 1020.BR SHT_SYMTAB
8d5bf179
MK
1021provides symbols for link editing, though it may also be used
1022for dynamic linking.
1023As a complete symbol table, it may contain
1024many symbols unnecessary for dynamic linking.
1025An object file can
1026also contain a
3233d665 1027.BR SHT_DYNSYM
8d5bf179 1028section.
3233d665
MK
1029.TP
1030.BR SHT_STRTAB
8d5bf179
MK
1031This section holds a string table.
1032An object file may have multiple
1033string table sections.
3233d665
MK
1034.TP
1035.BR SHT_RELA
8d5bf179
MK
1036This section holds relocation entries with explicit addends, such
1037as type
969c00ce 1038.IR Elf32_Rela
8d5bf179
MK
1039for the 32-bit class of object files.
1040An object may have multiple
1041relocation sections.
3233d665
MK
1042.TP
1043.BR SHT_HASH
8d5bf179
MK
1044This section holds a symbol hash table.
1045An object participating in
1046dynamic linking must contain a symbol hash table.
1047An object file may
1048have only one hash table.
3233d665
MK
1049.TP
1050.BR SHT_DYNAMIC
8d5bf179
MK
1051This section holds information for dynamic linking.
1052An object file may
1053have only one dynamic section.
3233d665
MK
1054.TP
1055.BR SHT_NOTE
8d5bf179 1056This section holds information that marks the file in some way.
3233d665
MK
1057.TP
1058.BR SHT_NOBITS
8d5bf179
MK
1059A section of this type occupies no space in the file but otherwise
1060resembles
3233d665 1061.BR SHT_PROGBITS .
8d5bf179 1062Although this section contains no bytes, the
3233d665 1063.IR sh_offset
8d5bf179 1064member contains the conceptual file offset.
3233d665
MK
1065.TP
1066.BR SHT_REL
8d5bf179
MK
1067This section holds relocation offsets without explicit addends, such
1068as type
969c00ce 1069.IR Elf32_Rel
8d5bf179
MK
1070for the 32-bit class of object files.
1071An object file may have multiple
1072relocation sections.
3233d665
MK
1073.TP
1074.BR SHT_SHLIB
8d5bf179 1075This section is reserved but has unspecified semantics.
3233d665
MK
1076.TP
1077.BR SHT_DYNSYM
8d5bf179
MK
1078This section holds a minimal set of dynamic linking symbols.
1079An
1080object file can also contain a
3233d665 1081.BR SHT_SYMTAB
8d5bf179 1082section.
3233d665
MK
1083.TP
1084.BR SHT_LOPROC
8d5bf179 1085This value up to and including
3233d665 1086.BR SHT_HIPROC
8d5bf179 1087is reserved for processor-specific semantics.
3233d665
MK
1088.TP
1089.BR SHT_HIPROC
8d5bf179 1090This value down to and including
3233d665 1091.BR SHT_LOPROC
8d5bf179 1092is reserved for processor-specific semantics.
3233d665
MK
1093.TP
1094.BR SHT_LOUSER
8d5bf179
MK
1095This value specifies the lower bound of the range of indices reserved for
1096application programs.
3233d665
MK
1097.TP
1098.BR SHT_HIUSER
8d5bf179
MK
1099This value specifies the upper bound of the range of indices reserved for
1100application programs.
1101Section types between
3233d665 1102.BR SHT_LOUSER
8d5bf179 1103and
3233d665 1104.BR SHT_HIUSER
8d5bf179
MK
1105may be used by the application, without conflicting with current or future
1106system-defined section types.
3233d665
MK
1107.\" .El
1108.RE
1109.TP
1110.IR sh_flags
8d5bf179
MK
1111Sections support one-bit flags that describe miscellaneous attributes.
1112If a flag bit is set in
3233d665 1113.IR sh_flags ,
8d5bf179 1114the attribute is
3233d665 1115"on"
8d5bf179
MK
1116for the section.
1117Otherwise, the attribute is
3233d665 1118"off"
8d5bf179
MK
1119or does not apply.
1120Undefined attributes are set to zero.
3233d665 1121.\" .Bl -tag -width "SHF_EXECINSTR" -compact
5ec60461
MK
1122.RS 10
1123.TP 15
3233d665 1124.BR SHF_WRITE
8d5bf179
MK
1125This section contains data that should be writable during process
1126execution.
3233d665
MK
1127.TP
1128.BR SHF_ALLOC
8d5bf179
MK
1129This section occupies memory during process execution.
1130Some control
1131sections do not reside in the memory image of an object file.
1132This
1133attribute is off for those sections.
3233d665
MK
1134.TP
1135.BR SHF_EXECINSTR
8d5bf179 1136This section contains executable machine instructions.
3233d665
MK
1137.TP
1138.BR SHF_MASKPROC
8d5bf179
MK
1139All bits included in this mask are reserved for processor-specific
1140semantics.
3233d665
MK
1141.RE
1142.\" .El
1143.TP
1144.IR sh_addr
8d5bf179
MK
1145If this section appears in the memory image of a process, this member
1146holds the address at which the section's first byte should reside.
1147Otherwise, the member contains zero.
3233d665
MK
1148.TP
1149.IR sh_offset
8d5bf179
MK
1150This member's value holds the byte offset from the beginning of the file
1151to the first byte in the section.
1152One section type,
3233d665 1153.BR SHT_NOBITS ,
8d5bf179 1154occupies no space in the file, and its
3233d665 1155.IR sh_offset
8d5bf179 1156member locates the conceptual placement in the file.
3233d665
MK
1157.TP
1158.IR sh_size
8d5bf179
MK
1159This member holds the section's size in bytes.
1160Unless the section type
1161is
3233d665 1162.BR SHT_NOBITS ,
8d5bf179 1163the section occupies
3233d665 1164.IR sh_size
8d5bf179
MK
1165bytes in the file.
1166A section of type
3233d665 1167.BR SHT_NOBITS
c7094399 1168may have a nonzero size, but it occupies no space in the file.
3233d665
MK
1169.TP
1170.IR sh_link
8d5bf179
MK
1171This member holds a section header table index link, whose interpretation
1172depends on the section type.
3233d665
MK
1173.TP
1174.IR sh_info
8d5bf179
MK
1175This member holds extra information, whose interpretation depends on the
1176section type.
3233d665
MK
1177.TP
1178.IR sh_addralign
8d5bf179
MK
1179Some sections have address alignment constraints.
1180If a section holds a
1181doubleword, the system must ensure doubleword alignment for the entire
1182section.
1183That is, the value of
3233d665 1184.IR sh_addr
8d5bf179 1185must be congruent to zero, modulo the value of
3233d665 1186.IR sh_addralign .
8d5bf179
MK
1187Only zero and positive integral powers of two are allowed.
1188Values of zero
1189or one mean the section has no alignment constraints.
3233d665
MK
1190.TP
1191.IR sh_entsize
8d5bf179
MK
1192Some sections hold a table of fixed-sized entries, such as a symbol table.
1193For such a section, this member gives the size in bytes for each entry.
1194This member contains zero if the section does not hold a table of
1195fixed-size entries.
3233d665
MK
1196.\" .El
1197.PP
8d5bf179 1198Various sections hold program and control information:
3233d665 1199.\" .Bl -tag -width ".shstrtab"
5ec60461 1200.TP 10
3233d665 1201.IR .bss
8d5bf179
MK
1202This section holds uninitialized data that contributes to the program's
1203memory image.
1204By definition, the system initializes the data with zeros
1205when the program begins to run.
1206This section is of type
3233d665 1207.BR SHT_NOBITS .
8d5bf179 1208The attribute types are
3233d665 1209.BR SHF_ALLOC
8d5bf179 1210and
3233d665
MK
1211.BR SHF_WRITE .
1212.TP
1213.IR .comment
8d5bf179
MK
1214This section holds version control information.
1215This section is of type
3233d665 1216.BR SHT_PROGBITS .
8d5bf179 1217No attribute types are used.
3233d665
MK
1218.TP
1219.IR .ctors
8d5bf179
MK
1220This section holds initialized pointers to the C++ constructor functions.
1221This section is of type
3233d665 1222.BR SHT_PROGBITS .
8d5bf179 1223The attribute types are
3233d665 1224.BR SHF_ALLOC
8d5bf179 1225and
3233d665
MK
1226.BR SHF_WRITE .
1227.TP
1228.IR .data
8d5bf179
MK
1229This section holds initialized data that contribute to the program's
1230memory image.
1231This section is of type
3233d665 1232.BR SHT_PROGBITS .
8d5bf179 1233The attribute types are
3233d665 1234.BR SHF_ALLOC
8d5bf179 1235and
3233d665
MK
1236.BR SHF_WRITE .
1237.TP
1238.IR .data1
8d5bf179
MK
1239This section holds initialized data that contribute to the program's
1240memory image.
1241This section is of type
3233d665 1242.BR SHT_PROGBITS .
8d5bf179 1243The attribute types are
3233d665 1244.BR SHF_ALLOC
8d5bf179 1245and
3233d665
MK
1246.BR SHF_WRITE .
1247.TP
1248.IR .debug
8d5bf179
MK
1249This section holds information for symbolic debugging.
1250The contents
1251are unspecified.
1252This section is of type
3233d665 1253.BR SHT_PROGBITS .
8d5bf179 1254No attribute types are used.
3233d665
MK
1255.TP
1256.IR .dtors
8d5bf179
MK
1257This section holds initialized pointers to the C++ destructor functions.
1258This section is of type
3233d665 1259.BR SHT_PROGBITS .
8d5bf179 1260The attribute types are
3233d665 1261.BR SHF_ALLOC
8d5bf179 1262and
3233d665
MK
1263.BR SHF_WRITE .
1264.TP
1265.IR .dynamic
8d5bf179
MK
1266This section holds dynamic linking information.
1267The section's attributes
1268will include the
3233d665 1269.BR SHF_ALLOC
8d5bf179
MK
1270bit.
1271Whether the
3233d665 1272.BR SHF_WRITE
d19a206d 1273bit is set is processor-specific.
8d5bf179 1274This section is of type
3233d665 1275.BR SHT_DYNAMIC .
8d5bf179 1276See the attributes above.
3233d665
MK
1277.TP
1278.IR .dynstr
8d5bf179
MK
1279This section holds strings needed for dynamic linking, most commonly
1280the strings that represent the names associated with symbol table entries.
1281This section is of type
3233d665 1282.BR SHT_STRTAB .
8d5bf179 1283The attribute type used is
3233d665
MK
1284.BR SHF_ALLOC .
1285.TP
1286.IR .dynsym
8d5bf179
MK
1287This section holds the dynamic linking symbol table.
1288This section is of type
3233d665 1289.BR SHT_DYNSYM .
8d5bf179 1290The attribute used is
3233d665
MK
1291.BR SHF_ALLOC .
1292.TP
1293.IR .fini
8d5bf179
MK
1294This section holds executable instructions that contribute to the process
1295termination code.
1296When a program exits normally the system arranges to
1297execute the code in this section.
1298This section is of type
3233d665 1299.BR SHT_PROGBITS .
8d5bf179 1300The attributes used are
3233d665 1301.BR SHF_ALLOC
8d5bf179 1302and
3233d665
MK
1303.BR SHF_EXECINSTR .
1304.TP
1305.IR .gnu.version
969c00ce
MK
1306This section holds the version symbol table, an array of
1307.I ElfN_Half
1308elements.
dbdab2f4 1309This section is of type
3233d665 1310.BR SHT_GNU_versym .
dbdab2f4 1311The attribute type used is
3233d665
MK
1312.BR SHF_ALLOC .
1313.TP
1314.IR .gnu.version_d
f6c0f137 1315This section holds the version symbol definitions, a table of
969c00ce
MK
1316.I ElfN_Verdef
1317structures.
1318This section is of type
3233d665 1319.BR SHT_GNU_verdef .
dbdab2f4 1320The attribute type used is
3233d665
MK
1321.BR SHF_ALLOC .
1322.TP
1323.IR .gnu.version_r
dbdab2f4 1324This section holds the version symbol needed elements, a table of
969c00ce
MK
1325.I ElfN_Verneed
1326structures.
1327This section is of
dbdab2f4 1328type
3233d665 1329.BR SHT_GNU_versym .
dbdab2f4 1330The attribute type used is
3233d665
MK
1331.BR SHF_ALLOC .
1332.TP
1333.IR .got
8d5bf179
MK
1334This section holds the global offset table.
1335This section is of type
3233d665 1336.BR SHT_PROGBITS .
76c637e1 1337The attributes are processor-specific.
3233d665
MK
1338.TP
1339.IR .hash
8d5bf179
MK
1340This section holds a symbol hash table.
1341This section is of type
3233d665 1342.BR SHT_HASH .
8d5bf179 1343The attribute used is
3233d665
MK
1344.BR SHF_ALLOC .
1345.TP
1346.IR .init
8d5bf179
MK
1347This section holds executable instructions that contribute to the process
1348initialization code.
1349When a program starts to run the system arranges to
1350execute the code in this section before calling the main program entry point.
1351This section is of type
3233d665 1352.BR SHT_PROGBITS .
8d5bf179 1353The attributes used are
3233d665 1354.BR SHF_ALLOC
8d5bf179 1355and
3233d665
MK
1356.BR SHF_EXECINSTR .
1357.TP
1358.IR .interp
8d5bf179
MK
1359This section holds the pathname of a program interpreter.
1360If the file has
1361a loadable segment that includes the section, the section's attributes will
1362include the
3233d665 1363.BR SHF_ALLOC
8d5bf179
MK
1364bit.
1365Otherwise, that bit will be off.
1366This section is of type
3233d665
MK
1367.BR SHT_PROGBITS .
1368.TP
1369.IR .line
8d5bf179
MK
1370This section holds line number information for symbolic debugging, which
1371describes the correspondence between the program source and the machine code.
1372The contents are unspecified.
1373This section is of type
3233d665 1374.BR SHT_PROGBITS .
8d5bf179 1375No attribute types are used.
3233d665
MK
1376.TP
1377.IR .note
8d5bf179 1378This section holds information in the
3233d665 1379"Note Section"
eed79eed 1380format.
8d5bf179 1381This section is of type
3233d665 1382.BR SHT_NOTE .
8d5bf179 1383No attribute types are used.
3233d665 1384OpenBSD
8d5bf179 1385native executables usually contain a
3233d665 1386.I .note.openbsd.ident
8d5bf179
MK
1387section to identify themselves, for the kernel to bypass any compatibility
1388ELF binary emulation tests when loading the file.
3233d665
MK
1389.TP
1390.IR .note.GNU-stack
dbdab2f4
MK
1391This section is used in Linux object files for declaring stack attributes.
1392This section is of type
3233d665 1393.BR SHT_PROGBITS .
dbdab2f4 1394The only attribute used is
3233d665 1395.BR SHF_EXECINSTR .
dbdab2f4
MK
1396This indicates to the GNU linker that the object file requires an
1397executable stack.
3233d665
MK
1398.TP
1399.IR .plt
8d5bf179
MK
1400This section holds the procedure linkage table.
1401This section is of type
3233d665 1402.BR SHT_PROGBITS .
76c637e1 1403The attributes are processor-specific.
3233d665
MK
1404.TP
1405.IR .relNAME
8d5bf179
MK
1406This section holds relocation information as described below.
1407If the file
1408has a loadable segment that includes relocation, the section's attributes
1409will include the
3233d665 1410.BR SHF_ALLOC
8d5bf179
MK
1411bit.
1412Otherwise the bit will be off.
1413By convention,
3233d665 1414"NAME"
8d5bf179
MK
1415is supplied by the section to which the relocations apply.
1416Thus a relocation
1417section for
3233d665 1418.BR .text
8d5bf179 1419normally would have the name
3233d665 1420.BR .rel.text .
8d5bf179 1421This section is of type
3233d665
MK
1422.BR SHT_REL .
1423.TP
1424.IR .relaNAME
8d5bf179
MK
1425This section holds relocation information as described below.
1426If the file
1427has a loadable segment that includes relocation, the section's attributes
1428will include the
3233d665 1429.BR SHF_ALLOC
8d5bf179
MK
1430bit.
1431Otherwise the bit will be off.
1432By convention,
3233d665 1433"NAME"
8d5bf179
MK
1434is supplied by the section to which the relocations apply.
1435Thus a relocation
1436section for
3233d665 1437.BR .text
8d5bf179 1438normally would have the name
3233d665 1439.BR .rela.text .
8d5bf179 1440This section is of type
3233d665
MK
1441.BR SHT_RELA .
1442.TP
1443.IR .rodata
8d5bf179 1444This section holds read-only data that typically contributes to a
24b74457 1445nonwritable segment in the process image.
8d5bf179 1446This section is of type
3233d665 1447.BR SHT_PROGBITS .
8d5bf179 1448The attribute used is
3233d665
MK
1449.BR SHF_ALLOC .
1450.TP
1451.IR .rodata1
8d5bf179 1452This section holds read-only data that typically contributes to a
24b74457 1453nonwritable segment in the process image.
8d5bf179 1454This section is of type
3233d665 1455.BR SHT_PROGBITS .
8d5bf179 1456The attribute used is
3233d665
MK
1457.BR SHF_ALLOC .
1458.TP
1459.IR .shstrtab
8d5bf179
MK
1460This section holds section names.
1461This section is of type
3233d665 1462.BR SHT_STRTAB .
8d5bf179 1463No attribute types are used.
3233d665
MK
1464.TP
1465.IR .strtab
8d5bf179
MK
1466This section holds strings, most commonly the strings that represent the
1467names associated with symbol table entries.
1468If the file has a loadable
1469segment that includes the symbol string table, the section's attributes
1470will include the
3233d665 1471.BR SHF_ALLOC
8d5bf179
MK
1472bit.
1473Otherwise the bit will be off.
1474This section is of type
3233d665
MK
1475.BR SHT_STRTAB .
1476.TP
1477.IR .symtab
8d5bf179
MK
1478This section holds a symbol table.
1479If the file has a loadable segment
1480that includes the symbol table, the section's attributes will include
1481the
3233d665 1482.BR SHF_ALLOC
8d5bf179
MK
1483bit.
1484Otherwise the bit will be off.
1485This section is of type
3233d665
MK
1486.BR SHT_SYMTAB .
1487.TP
1488.IR .text
8d5bf179 1489This section holds the
3233d665 1490"text",
8d5bf179
MK
1491or executable instructions, of a program.
1492This section is of type
3233d665 1493.BR SHT_PROGBITS .
8d5bf179 1494The attributes used are
3233d665 1495.BR SHF_ALLOC
8d5bf179 1496and
3233d665
MK
1497.BR SHF_EXECINSTR .
1498.\" .El
5ec60461 1499.PP
fea681da
MK
1500String table sections hold null-terminated character sequences, commonly
1501called strings.
1502The object file uses these strings to represent symbol
1503and section names.
1504One references a string as an index into the string
1505table section.
1506The first byte, which is index zero, is defined to hold
f81fb444 1507a null byte (\(aq\\0\(aq).
fea681da 1508Similarly, a string table's last byte is defined to
28d88c17 1509hold a null byte, ensuring null termination for all strings.
5ec60461 1510.PP
fea681da
MK
1511An object file's symbol table holds information needed to locate and
1512relocate a program's symbolic definitions and references.
1513A symbol table
1514index is a subscript into this array.
088a639b 1515.in +4n
3233d665
MK
1516.nf
1517
fea681da 1518typedef struct {
dd0a09a5
MK
1519 uint32_t st_name;
1520 Elf32_Addr st_value;
1521 uint32_t st_size;
1522 unsigned char st_info;
1523 unsigned char st_other;
1524 uint16_t st_shndx;
fea681da 1525} Elf32_Sym;
3233d665
MK
1526.fi
1527.in
088a639b 1528.in +4n
3233d665
MK
1529.nf
1530
fea681da 1531typedef struct {
dd0a09a5
MK
1532 uint32_t st_name;
1533 unsigned char st_info;
1534 unsigned char st_other;
1535 uint16_t st_shndx;
1536 Elf64_Addr st_value;
1537 uint64_t st_size;
fea681da 1538} Elf64_Sym;
3233d665
MK
1539.fi
1540.in
5ec60461 1541.PP
c13182ef 1542The 32-bit and 64-bit versions have the same members, just in a different
28d979c8 1543order.
9a23a0c0 1544.\" .Bl -tag -width "st_value"
5ec60461 1545.TP 10
3233d665 1546.IR st_name
fea681da
MK
1547This member holds an index into the object file's symbol string table,
1548which holds character representations of the symbol names.
1549If the value
c7094399 1550is nonzero, it represents a string table index that gives the symbol
fea681da
MK
1551name.
1552Otherwise, the symbol table has no name.
3233d665
MK
1553.TP
1554.IR st_value
fea681da 1555This member gives the value of the associated symbol.
3233d665
MK
1556.TP
1557.IR st_size
fea681da
MK
1558Many symbols have associated sizes.
1559This member holds zero if the symbol
1560has no size or an unknown size.
3233d665
MK
1561.TP
1562.IR st_info
fea681da 1563This member specifies the symbol's type and binding attributes:
3233d665 1564.\" .Bl -tag -width "STT_SECTION"
5ec60461 1565.RS 10
3233d665
MK
1566.TP 12
1567.BR STT_NOTYPE
8d5bf179 1568The symbol's type is not defined.
3233d665
MK
1569.TP
1570.BR STT_OBJECT
8d5bf179 1571The symbol is associated with a data object.
3233d665
MK
1572.TP
1573.BR STT_FUNC
8d5bf179 1574The symbol is associated with a function or other executable code.
3233d665
MK
1575.TP
1576.BR STT_SECTION
8d5bf179
MK
1577The symbol is associated with a section.
1578Symbol table entries of
1579this type exist primarily for relocation and normally have
3233d665 1580.BR STB_LOCAL
8d5bf179 1581bindings.
3233d665
MK
1582.TP
1583.BR STT_FILE
8d5bf179
MK
1584By convention, the symbol's name gives the name of the source file
1585associated with the object file.
1586A file symbol has
3233d665 1587.BR STB_LOCAL
8d5bf179 1588bindings, its section index is
3233d665 1589.BR SHN_ABS ,
8d5bf179 1590and it precedes the other
3233d665 1591.BR STB_LOCAL
8d5bf179 1592symbols of the file, if it is present.
3233d665
MK
1593.TP
1594.BR STT_LOPROC
8d5bf179 1595This value up to and including
3233d665 1596.BR STT_HIPROC
8d5bf179 1597is reserved for processor-specific semantics.
3233d665
MK
1598.TP
1599.BR STT_HIPROC
8d5bf179 1600This value down to and including
3233d665 1601.BR STT_LOPROC
8d5bf179 1602is reserved for processor-specific semantics.
3233d665
MK
1603.\" .El
1604.\" .Bl -tag -width "STB_GLOBAL"
1605.TP
1606.BR STB_LOCAL
8d5bf179
MK
1607Local symbols are not visible outside the object file containing their
1608definition.
1609Local symbols of the same name may exist in multiple files
1610without interfering with each other.
3233d665
MK
1611.TP
1612.BR STB_GLOBAL
8d5bf179
MK
1613Global symbols are visible to all object files being combined.
1614One file's
1615definition of a global symbol will satisfy another file's undefined
1616reference to the same symbol.
3233d665
MK
1617.TP
1618.BR STB_WEAK
8d5bf179
MK
1619Weak symbols resemble global symbols, but their definitions have lower
1620precedence.
3233d665
MK
1621.TP
1622.BR STB_LOPROC
8d5bf179 1623This value up to and including
3233d665 1624.BR STB_HIPROC
8d5bf179 1625is reserved for processor-specific semantics.
3233d665
MK
1626.TP
1627.BR STB_HIPROC
8d5bf179 1628This value down to and including
3233d665 1629.BR STB_LOPROC
8d5bf179 1630is reserved for processor-specific semantics.
5ec60461 1631.IP
8d5bf179 1632There are macros for packing and unpacking the binding and type fields:
5ec60461 1633.IP
3233d665 1634.BR ELF32_ST_BIND (info)
8d5bf179 1635or
3233d665 1636.BR ELF64_ST_BIND (info)
db4163b1
MK
1637extract a binding from an
1638.I st_info
1639value.
5ec60461 1640.IP
3233d665 1641.BR ELF32_ST_TYPE (info)
8d5bf179 1642or
3233d665 1643.BR ELF64_ST_TYPE (info)
8d5bf179 1644.br
3233d665
MK
1645extract a type from an
1646.I st_info
1647value.
5ec60461 1648.IP
3233d665 1649.BR ELF32_ST_INFO "(bind, type)"
8d5bf179 1650or
3233d665 1651.BR ELF64_ST_INFO "(bind, type)"
8d5bf179 1652.br
db4163b1
MK
1653convert a binding and a type into an
1654.I st_info
1655value.
3233d665
MK
1656.RE
1657.\" .El
1658.TP
1659.IR st_other
dbdab2f4 1660This member defines the symbol visibility.
3233d665 1661.\" .Bl -tag -width "STV_PROTECTED"
5ec60461 1662.RS 10
3233d665 1663.TP 16
5ec60461 1664.PD 0
3233d665 1665.BR STV_DEFAULT
dbdab2f4 1666Default symbol visibility rules.
3233d665
MK
1667.TP
1668.BR STV_INTERNAL
e2badfdf 1669Processor-specific hidden class.
3233d665
MK
1670.TP
1671.BR STV_HIDDEN
dbdab2f4 1672Symbol is unavailable in other modules.
3233d665
MK
1673.TP
1674.BR STV_PROTECTED
dbdab2f4 1675Not preemptible, not exported.
5ec60461
MK
1676.PD
1677.PP
dbdab2f4 1678There are macros for extracting the visibility type:
5ec60461 1679.PP
3233d665 1680.BR ELF32_ST_VISIBILITY (other)
dbdab2f4 1681or
3233d665
MK
1682.BR ELF64_ST_VISIBILITY (other)
1683.RE
1684.\" .El
1685.TP
1686.IR st_shndx
8d5bf179 1687Every symbol table entry is
3233d665 1688"defined"
8d5bf179
MK
1689in relation to some section.
1690This member holds the relevant section
1691header table index.
3233d665 1692.\" .El
5ec60461 1693.PP
fea681da
MK
1694Relocation is the process of connecting symbolic references with
1695symbolic definitions.
1696Relocatable files must have information that
1697describes how to modify their section contents, thus allowing executable
ecccf7c2 1698and shared object files to hold the right information for a process's
fea681da
MK
1699program image.
1700Relocation entries are these data.
5ec60461 1701.PP
fea681da 1702Relocation structures that do not need an addend:
088a639b 1703.in +4n
3233d665
MK
1704.nf
1705
fea681da 1706typedef struct {
dd0a09a5
MK
1707 Elf32_Addr r_offset;
1708 uint32_t r_info;
fea681da 1709} Elf32_Rel;
3233d665
MK
1710.fi
1711.in
088a639b 1712.in +4n
3233d665
MK
1713.nf
1714
fea681da 1715typedef struct {
dd0a09a5
MK
1716 Elf64_Addr r_offset;
1717 uint64_t r_info;
fea681da 1718} Elf64_Rel;
3233d665
MK
1719.fi
1720.in
5ec60461 1721.PP
fea681da 1722Relocation structures that need an addend:
088a639b 1723.in +4n
3233d665
MK
1724.nf
1725
fea681da 1726typedef struct {
dd0a09a5
MK
1727 Elf32_Addr r_offset;
1728 uint32_t r_info;
1729 int32_t r_addend;
fea681da 1730} Elf32_Rela;
3233d665
MK
1731.fi
1732.in
088a639b 1733.in +4n
3233d665
MK
1734.nf
1735
fea681da 1736typedef struct {
dd0a09a5
MK
1737 Elf64_Addr r_offset;
1738 uint64_t r_info;
1739 int64_t r_addend;
fea681da 1740} Elf64_Rela;
3233d665
MK
1741.fi
1742.in
1743.\" .Bl -tag -width "r_offset"
1744.TP 12
1745.IR r_offset
8d5bf179
MK
1746This member gives the location at which to apply the relocation action.
1747For a relocatable file, the value is the byte offset from the beginning
1748of the section to the storage unit affected by the relocation.
1749For an
1750executable file or shared object, the value is the virtual address of
1751the storage unit affected by the relocation.
3233d665
MK
1752.TP
1753.IR r_info
8d5bf179
MK
1754This member gives both the symbol table index with respect to which the
1755relocation must be made and the type of relocation to apply.
1756Relocation
76c637e1 1757types are processor-specific.
8d5bf179
MK
1758When the text refers to a relocation
1759entry's relocation type or symbol table index, it means the result of
1760applying
cab67c64 1761.BR ELF[32|64]_R_TYPE
8d5bf179 1762or
3233d665 1763.BR ELF[32|64]_R_SYM ,
8d5bf179 1764respectively, to the entry's
3233d665 1765.IR r_info
8d5bf179 1766member.
3233d665
MK
1767.TP
1768.IR r_addend
8d5bf179
MK
1769This member specifies a constant addend used to compute the value to be
1770stored into the relocatable field.
3233d665 1771.\" .El
5ec60461 1772.PP
c13182ef
MK
1773The .dynamic section contains a series of structures that hold relevant
1774dynamic linking information.
1775The d_tag member controls the interpretation
8d5bf179 1776of d_un.
088a639b 1777.in +4n
3233d665
MK
1778.nf
1779
8d5bf179 1780typedef struct {
dd0a09a5
MK
1781 Elf32_Sword d_tag;
1782 union {
3233d665
MK
1783 Elf32_Word d_val;
1784 Elf32_Addr d_ptr;
dd0a09a5 1785 } d_un;
8d5bf179
MK
1786} Elf32_Dyn;
1787extern Elf32_Dyn _DYNAMIC[];
3233d665
MK
1788.fi
1789.in
088a639b 1790.in +4n
3233d665
MK
1791.nf
1792
8d5bf179 1793typedef struct {
dd0a09a5
MK
1794 Elf64_Sxword d_tag;
1795 union {
1796 Elf64_Xword d_val;
1797 Elf64_Addr d_ptr;
1798 } d_un;
8d5bf179
MK
1799} Elf64_Dyn;
1800extern Elf64_Dyn _DYNAMIC[];
3233d665
MK
1801.fi
1802.in
1803.\" .Bl -tag -width "d_tag"
5ec60461 1804.TP 10
3233d665 1805.IR d_tag
8d5bf179 1806This member may have any of the following values:
3233d665 1807.\" .Bl -tag -width "DT_SYMBOLIC"
5ec60461 1808.RS 10
3233d665
MK
1809.TP 12
1810.BR DT_NULL
8d5bf179 1811Marks end of dynamic section
3233d665
MK
1812.TP
1813.BR DT_NEEDED
8d5bf179 1814String table offset to name of a needed library
3233d665
MK
1815.TP
1816.BR DT_PLTRELSZ
8d5bf179 1817Size in bytes of PLT relocs
3233d665
MK
1818.TP
1819.BR DT_PLTGOT
8d5bf179 1820Address of PLT and/or GOT
3233d665
MK
1821.TP
1822.BR DT_HASH
8d5bf179 1823Address of symbol hash table
3233d665
MK
1824.TP
1825.BR DT_STRTAB
8d5bf179 1826Address of string table
3233d665
MK
1827.TP
1828.BR DT_SYMTAB
8d5bf179 1829Address of symbol table
3233d665
MK
1830.TP
1831.BR DT_RELA
8d5bf179 1832Address of Rela relocs table
3233d665
MK
1833.TP
1834.BR DT_RELASZ
8d5bf179 1835Size in bytes of Rela table
3233d665
MK
1836.TP
1837.BR DT_RELAENT
8d5bf179 1838Size in bytes of a Rela table entry
3233d665
MK
1839.TP
1840.BR DT_STRSZ
8d5bf179 1841Size in bytes of string table
3233d665
MK
1842.TP
1843.BR DT_SYMENT
8d5bf179 1844Size in bytes of a symbol table entry
3233d665
MK
1845.TP
1846.BR DT_INIT
8d5bf179 1847Address of the initialization function
3233d665
MK
1848.TP
1849.BR DT_FINI
8d5bf179 1850Address of the termination function
3233d665
MK
1851.TP
1852.BR DT_SONAME
8d5bf179 1853String table offset to name of shared object
3233d665
MK
1854.TP
1855.BR DT_RPATH
8d5bf179 1856String table offset to library search path (deprecated)
3233d665
MK
1857.TP
1858.BR DT_SYMBOLIC
8d5bf179 1859Alert linker to search this shared object before the executable for symbols
3233d665
MK
1860.TP
1861.BR DT_REL
8d5bf179 1862Address of Rel relocs table
3233d665
MK
1863.TP
1864.BR DT_RELSZ
8d5bf179 1865Size in bytes of Rel table
3233d665
MK
1866.TP
1867.BR DT_RELENT
8d5bf179 1868Size in bytes of a Rel table entry
3233d665
MK
1869.TP
1870.BR DT_PLTREL
8d5bf179 1871Type of reloc the PLT refers (Rela or Rel)
3233d665
MK
1872.TP
1873.BR DT_DEBUG
8d5bf179 1874Undefined use for debugging
3233d665
MK
1875.TP
1876.BR DT_TEXTREL
24b74457 1877Absence of this indicates no relocs should apply to a nonwritable segment
3233d665
MK
1878.TP
1879.BR DT_JMPREL
8d5bf179 1880Address of reloc entries solely for the PLT
3233d665
MK
1881.TP
1882.BR DT_BIND_NOW
c13182ef 1883Instruct dynamic linker to process all relocs before transferring control to
8d5bf179 1884the executable
3233d665
MK
1885.TP
1886.BR DT_RUNPATH
8d5bf179 1887String table offset to library search path
3233d665
MK
1888.TP
1889.BR DT_LOPROC
8d5bf179 1890Start of processor-specific semantics
3233d665
MK
1891.TP
1892.BR DT_HIPROC
8d5bf179 1893End of processor-specific semantics
3233d665
MK
1894.RE
1895.\" .El
1896.TP
1897.IR d_val
8d5bf179 1898This member represents integer values with various interpretations.
3233d665
MK
1899.TP
1900.IR d_ptr
c13182ef
MK
1901This member represents program virtual addresses.
1902When interpreting
1903these addresses, the actual address should be computed based on the
1904original file value and memory base address.
1905Files do not contain
8d5bf179 1906relocation entries to fixup these addresses.
3233d665
MK
1907.TP
1908.I _DYNAMIC
c13182ef 1909Array containing all the dynamic structures in the .dynamic section.
8d5bf179 1910This is automatically populated by the linker.
3233d665
MK
1911.\" .El
1912.SH NOTES
1913.\" OpenBSD
75434268 1914.\" ELF support first appeared in
3233d665 1915.\" OpenBSD 1.2,
75434268
MK
1916.\" although not all supported platforms use it as the native
1917.\" binary file format.
1918ELF first appeared in
3233d665 1919System V.
e37e3282 1920The ELF format is an adopted standard.
6866d935
DH
1921.PP
1922The extensions for
1923.IR e_phnum ,
1924.IR e_shnum
1925and
1926.IR e_strndx
1927respectively are
1928Linux extensions.
1929Sun, BSD and AMD64 also support them; for further information,
1930look under SEE ALSO.
3233d665 1931.\" .SH AUTHORS
d2dc6294
MK
1932.\" The original version of this manual page was written by
1933.\" .An Jeroen Ruigrok van der Werven
1934.\" .Aq asmodai@FreeBSD.org
1935.\" with inspiration from BSDi's
1936.\" .Bsx
1937.\" .Nm elf
1938.\" man page.
3233d665
MK
1939.SH SEE ALSO
1940.BR as (1),
1941.BR gdb (1),
1942.BR ld (1),
1943.BR objdump (1),
1944.BR execve (2),
1945.BR core (5)
5ec60461 1946.PP
3233d665
MK
1947Hewlett-Packard,
1948.IR "Elf-64 Object File Format" .
5ec60461 1949.PP
3233d665
MK
1950Santa Cruz Operation,
1951.IR "System V Application Binary Interface" .
5ec60461 1952.PP
008f1ecc 1953UNIX System Laboratories,
3233d665
MK
1954"Object Files",
1955.IR "Executable and Linking Format (ELF)" .
6866d935
DH
1956.PP
1957Sun Microsystems,
1958.IR "Linker and Libraries Guide" .
1959.PP
1960AMD64 ABI Draft,
1961.IR "System V Application Binary Interface AMD64 Architecture Processor Supplement" .
1962.PP