%-12345X@PJL ENTER LANGUAGE = PostScript %!PS %%Version: 3.15 %%DocumentFonts: (atend) %%Pages: (atend) %%EndComments %ident "@(#)lp:filter/postscript/postscript/dpost.ps 1.1.2.1" % % Version 3.15 prologue for troff files. % /#copies 1 store /aspectratio 1 def /formsperpage 1 def /landscape false def /linewidth .3 def /magnification 1 def /margin 0 def /orientation 0 def /resolution 720 def /xoffset 0 def /yoffset 0 def /roundpage true def /useclippath true def /pagebbox [0 0 612 792] def /R /Times-Roman def /I /Times-Italic def /B /Times-Bold def /BI /Times-BoldItalic def /H /Helvetica def /HI /Helvetica-Oblique def /HB /Helvetica-Bold def /HX /Helvetica-BoldOblique def /CW /Courier def /CO /Courier def /CI /Courier-Oblique def /CB /Courier-Bold def /CX /Courier-BoldOblique def /PA /Palatino-Roman def /PI /Palatino-Italic def /PB /Palatino-Bold def /PX /Palatino-BoldItalic def /Hr /Helvetica-Narrow def /Hi /Helvetica-Narrow-Oblique def /Hb /Helvetica-Narrow-Bold def /Hx /Helvetica-Narrow-BoldOblique def /KR /Bookman-Light def /KI /Bookman-LightItalic def /KB /Bookman-Demi def /KX /Bookman-DemiItalic def /AR /AvantGarde-Book def /AI /AvantGarde-BookOblique def /AB /AvantGarde-Demi def /AX /AvantGarde-DemiOblique def /NR /NewCenturySchlbk-Roman def /NI /NewCenturySchlbk-Italic def /NB /NewCenturySchlbk-Bold def /NX /NewCenturySchlbk-BoldItalic def /ZD /ZapfDingbats def /ZI /ZapfChancery-MediumItalic def /VR /Varitimes#Roman def /VI /Varitimes#Italic def /VB /Varitimes#Bold def /VX /Varitimes#BoldItalic def /S /S def /S1 /S1 def /GR /Symbol def /inch {72 mul} bind def /min {2 copy gt {exch} if pop} bind def /setup { counttomark 2 idiv {def} repeat pop landscape {/orientation 90 orientation add def} if /scaling 72 resolution div def linewidth setlinewidth 1 setlinecap pagedimensions xcenter ycenter translate orientation neg rotate width 2 div neg height 2 div translate xoffset inch yoffset inch translate margin 2 div dup neg translate magnification dup aspectratio mul scale scaling scaling scale /Symbol /S Sdefs cf /Times-Roman /S1 S1defs cf 0 0 moveto } def /pagedimensions { useclippath userdict /gotpagebbox known not and { /pagebbox [clippath pathbbox newpath] def roundpage currentdict /roundpagebbox known and {roundpagebbox} if } if pagebbox aload pop 4 -1 roll exch 4 1 roll 4 copy landscape {4 2 roll} if sub /width exch def sub /height exch def add 2 div /xcenter exch def add 2 div /ycenter exch def userdict /gotpagebbox true put } def /pagesetup { /page exch def currentdict /pagedict known currentdict page known and { page load pagedict exch get cvx exec } if } def /decodingdefs [ {counttomark 2 idiv {y moveto show} repeat} {neg /y exch def counttomark 2 idiv {y moveto show} repeat} {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} {counttomark 2 idiv {y moveto show} repeat} {neg setfunnytext} ] def /setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def /w {neg moveto show} bind def /m {neg dup /y exch def moveto} bind def /done {/lastpage where {pop lastpage} if} def /f { dup /font exch def findfont exch dup /ptsize exch def scaling div dup /size exch def scalefont setfont linewidth ptsize mul scaling 10 mul div setlinewidth /spacewidth ( ) stringwidth pop def } bind def /changefont { /fontheight exch def /fontslant exch def currentfont [ 1 0 fontheight ptsize div fontslant sin mul fontslant cos div fontheight ptsize div 0 0 ] makefont setfont } bind def /sf {f} bind def /cf { dup length 2 idiv /entries exch def /chtab exch def /newfont exch def findfont dup length 1 add dict /newdict exch def {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall newdict /Metrics entries dict put newdict /Metrics get begin chtab aload pop 1 1 entries {pop def} for newfont newdict definefont pop end } bind def % % A few arrays used to adjust reference points and character widths in some % of the printer resident fonts. If square roots are too high try changing % the lines describing /radical and /radicalex to, % % /radical [0 -75 550 0] % /radicalex [-50 -75 500 0] % /Sdefs [ /bracketlefttp [220 500] /bracketleftbt [220 500] /bracketrighttp [-70 380] /bracketrightbt [-70 380] /braceleftbt [220 490] /bracketrightex [220 -125 500 0] /radical [0 0 550 0] /radicalex [-50 0 500 0] /parenleftex [-20 -170 0 0] /integral [100 -50 500 0] /infinity [10 -75 730 0] ] def /S1defs [ /underscore [0 80 500 0] /endash [7 90 650 0] ] def %%EndProlog %%BeginSetup mark /resolution 720 def setup 2 setdecoding %%EndSetup %%Page: 1 1 save mark 1 pagesetup cleartomark restore %%BeginGlobal %ident "@(#)lp:filter/postscript/postscript/draw.ps 1.1.2.1" % % Version 3.15 drawing procedures for dpost. Automatically pulled in, but only % when needed. % /inpath false def /savematrix matrix currentmatrix def /Dl { inpath {pop pop neg lineto} {newpath neg moveto neg lineto stroke} ifelse } bind def /De { /y1 exch 2 div def /x1 exch 2 div def neg exch x1 add exch translate x1 y1 scale 0 0 1 0 360 inpath {1 0 moveto arc savematrix setmatrix} {newpath arc savematrix setmatrix stroke} ifelse } bind def /Da { /dy2 exch def /dx2 exch def /dy1 exch def /dx1 exch def dy1 add neg exch dx1 add exch dx1 dx1 mul dy1 dy1 mul add sqrt dy1 dx1 neg atan dy2 neg dx2 atan inpath {arc} {newpath arc stroke} ifelse } bind def /DA { /dy2 exch def /dx2 exch def /dy1 exch def /dx1 exch def dy1 add neg exch dx1 add exch dx1 dx1 mul dy1 dy1 mul add sqrt dy1 dx1 neg atan dy2 neg dx2 atan inpath {arcn} {newpath arcn stroke} ifelse } bind def /Ds { /y2 exch def /x2 exch def /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 5 x1 mul add 6 div y0 5 y1 mul add -6 div x2 5 x1 mul add 6 div y2 5 y1 mul add -6 div x1 x2 add 2 div y1 y2 add -2 div inpath {curveto} {newpath x0 x1 add 2 div y0 y1 add -2 div moveto curveto stroke} ifelse } bind def %%EndGlobal save mark 16 HB f 5458 516 658 516 Dl 21 HB f (I)3122 2430 w (Executable and Linkable Format \(ELF\))4 3828 1 1234 3270 t cleartomark showpage restore %%EndPage: 1 1 %%Page: 1 2 save mark 2 pagesetup 16 HB f 5458 516 658 516 Dl 18 HB f (Contents)1378 682 w 9 HB f 5458 1626 658 1626 Dl 13 HB f (Preface)1378 1740 w 9 HB f 5458 2106 658 2106 Dl 24 HB f (1)898 2295 w 13 HB f (OBJECT FILES)1 932 1 1378 2220 t 10 H f (Introduction)1378 2340 w 9 H f (1-1)5170 2340 w 10 H f (ELF Header)1 541 1 1378 2460 t 9 H f (1-3)5170 2460 w 10 H f (Sections)1378 2580 w 9 H f (1-8)5170 2580 w 10 H f (String Table)1 541 1 1378 2700 t 9 H f (1-16)5170 2700 w 10 H f (Symbol Table)1 613 1 1378 2820 t 9 H f (1-17)5170 2820 w 10 H f (Relocation)1378 2940 w 9 H f (1-21)5170 2940 w 5458 3306 658 3306 Dl 24 HB f (2)898 3495 w 13 HB f (PROGRAM LOADING AND DYNAMIC LINKING)4 2845 1 1378 3420 t 10 H f (Introduction)1378 3540 w 9 H f (2-1)5170 3540 w 10 H f (Program Header)1 741 1 1378 3660 t 9 H f (2-2)5170 3660 w 10 H f (Program Loading)1 770 1 1378 3780 t 9 H f (2-7)5170 3780 w 10 H f (Dynamic Linking)1 735 1 1378 3900 t 9 H f (2-10)5170 3900 w 5458 4266 658 4266 Dl 24 HB f (3)898 4455 w 13 HB f (C LIBRARY)1 708 1 1378 4380 t 10 H f (C Library)1 406 1 1378 4500 t 9 H f (3-1)5170 4500 w 5458 4866 658 4866 Dl 24 HB f (I)898 5055 w 13 HB f (Index)1378 4980 w 10 H f (Index)1378 5100 w 9 H f (I-1)5170 5100 w 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (i)5313 7324 w cleartomark showpage restore %%EndPage: 1 2 %%Page: 2 3 save mark 3 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 9 R f (ii)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 2 3 %%Page: 3 4 save mark 4 pagesetup 16 HB f 5458 516 658 516 Dl 20 HB f (Figures and Tables)2 1828 1 1378 682 t 9 PA f 5458 1596 658 1596 Dl 9 HB f (Figure 1-1:)1 460 1 658 1730 t 9 H f ( 1-1)1 3392(Object File Format)2 740 2 1168 1730 t 9 HB f (Figure 1-2:)1 460 1 658 1840 t 9 H f ( 1-2)1 3412(32-Bit Data Types)2 720 2 1168 1840 t 9 HB f (Figure 1-3:)1 460 1 658 1950 t 9 H f ( 1-3)1 3647(ELF Header)1 485 2 1168 1950 t 9 HB f (Figure 1-4:)1 460 1 658 2060 t 9 CW f ( ])1 80(e _ i d e n t [)7 404 2 1166 2060 t 9 H f ( 1-5)1 2782(Identi\256cation Indexes)1 845 2 1673 2060 t 9 HB f (Figure 1-5:)1 460 1 658 2170 t 9 H f (Data Encoding)1 590 1 1168 2170 t 9 CW f (E L F D A T A 2 L S B)10 554 1 1781 2170 t 9 H f (1-6)5170 2170 w 9 HB f (Figure 1-6:)1 460 1 658 2280 t 9 H f (Data Encoding)1 590 1 1168 2280 t 9 CW f (E L F D A T A 2 M S B)10 554 1 1781 2280 t 9 H f (1-6)5170 2280 w 9 HB f (Figure 1-7:)1 460 1 658 2390 t 9 H f (32-bit Intel Architecture Identi\256cation,)3 1480 1 1168 2390 t 9 CW f (e _ i d e n t)6 354 1 2671 2390 t 9 H f (1-7)5170 2390 w 9 HB f (Figure 1-8:)1 460 1 658 2500 t 9 H f ( 1-8)1 3172(Special Section Indexes)2 960 2 1168 2500 t 9 HB f (Figure 1-9:)1 460 1 658 2610 t 9 H f ( 1-9)1 3512(Section Header)1 620 2 1168 2610 t 9 HB f (Figure 1-10:)1 510 1 658 2720 t 9 H f (Section Types,)1 595 1 1218 2720 t 9 CW f (s h _ t y p e)6 354 1 1836 2720 t 9 H f (1-10)5170 2720 w 9 HB f (Figure 1-11:)1 510 1 658 2830 t 9 H f ( 1-11)1 2682(Section Header Table Entry: Index 0)5 1450 2 1218 2830 t 9 HB f (Figure 1-12:)1 510 1 658 2940 t 9 H f (Section Attribute Flags,)2 930 1 1218 2940 t 9 CW f (s h _ f l a g s)7 404 1 2171 2940 t 9 H f (1-12)5170 2940 w 9 HB f (Figure 1-13:)1 510 1 658 3050 t 9 CW f (s h _ l i n k)6 354 1 1216 3050 t 9 H f (and)1593 3050 w 9 CW f (s h _ i n f o)6 354 1 1791 3050 t 9 H f (Interpretation 1-13)1 3182 1 2168 3050 t 9 HB f (Figure 1-14:)1 510 1 658 3160 t 9 H f ( 1-13)1 3467(Special Sections)1 665 2 1218 3160 t 9 HB f (Figure 1-15:)1 510 1 658 3270 t 9 H f ( 1-16)1 3307(String Table Indexes)2 825 2 1218 3270 t 9 HB f (Figure 1-16:)1 510 1 658 3380 t 9 H f ( 1-17)1 3347(Symbol Table Entry)2 785 2 1218 3380 t 9 HB f (Figure 1-17:)1 510 1 658 3490 t 9 H f (Symbol Binding,)1 650 1 1218 3490 t 9 CW f (E L F 3 2 _ S T _ B I N D)12 654 1 1891 3490 t 9 H f (1-18)5170 3490 w 9 HB f (Figure 1-18:)1 510 1 658 3600 t 9 H f (Symbol Types,)1 595 1 1218 3600 t 9 CW f (E L F 3 2 _ S T _ T Y P E)12 654 1 1836 3600 t 9 H f (1-19)5170 3600 w 9 HB f (Figure 1-19:)1 510 1 658 3710 t 9 H f ( 1-20)1 3002(Symbol Table Entry: Index 0)4 1130 2 1218 3710 t 9 HB f (Figure 1-20:)1 510 1 658 3820 t 9 H f ( 1-21)1 3402(Relocation Entries)1 730 2 1218 3820 t 9 HB f (Figure 1-21:)1 510 1 658 3930 t 9 H f ( 1-22)1 3392(Relocatable Fields)1 740 2 1218 3930 t 9 HB f (Figure 1-22:)1 510 1 658 4040 t 9 H f ( 1-23)1 3437(Relocation Types)1 695 2 1218 4040 t 9 HB f (Figure 2-1:)1 460 1 658 4150 t 9 H f ( 2-2)1 3467(Program Header)1 665 2 1168 4150 t 9 HB f (Figure 2-2:)1 460 1 658 4260 t 9 H f (Segment Types,)1 655 1 1168 4260 t 9 CW f (p _ t y p e)5 304 1 1846 4260 t 9 H f (2-3)5170 4260 w 9 HB f (Figure 2-3:)1 460 1 658 4370 t 9 H f ( 2-4)1 3467(Note Information)1 665 2 1168 4370 t 9 HB f (Figure 2-4:)1 460 1 658 4480 t 9 H f ( 2-5)1 3182(Example Note Segment)2 950 2 1168 4480 t 9 HB f (Figure 2-5:)1 460 1 658 4590 t 9 H f ( 2-7)1 3517(Executable File)1 615 2 1168 4590 t 9 HB f (Figure 2-6:)1 460 1 658 4700 t 9 H f ( 2-7)1 3037(Program Header Segments)2 1095 2 1168 4700 t 9 HB f (Figure 2-7:)1 460 1 658 4810 t 9 H f ( 2-8)1 3102(Process Image Segments)2 1030 2 1168 4810 t 9 HB f (Figure 2-8:)1 460 1 658 4920 t 9 H f ( 2-9)1 2347(Example Shared Object Segment Addresses)4 1785 2 1168 4920 t 9 HB f (Figure 2-9:)1 460 1 658 5030 t 9 H f ( 2-12)1 3442(Dynamic Structure)1 740 2 1168 5030 t 9 HB f (Figure 2-10:)1 510 1 658 5140 t 9 H f (Dynamic Array Tags,)2 840 1 1218 5140 t 9 CW f (d _ t a g)4 254 1 2081 5140 t 9 H f (2-12)5170 5140 w 9 HB f (Figure 2-11:)1 510 1 658 5250 t 9 H f ( 2-17)1 3357(Global Offset Table)2 775 2 1218 5250 t 9 HB f (Figure 2-12:)1 510 1 658 5360 t 9 H f ( 2-17)1 2752(Absolute Procedure Linkage Table)3 1380 2 1218 5360 t 9 HB f (Figure 2-13:)1 510 1 658 5470 t 9 H f ( 2-18)1 2252(Position-Independent Procedure Linkage Table)3 1880 2 1218 5470 t 9 HB f (Figure 2-14:)1 510 1 658 5580 t 9 H f ( 2-19)1 3347(Symbol Hash Table)2 785 2 1218 5580 t 9 HB f (Figure 2-15:)1 510 1 658 5690 t 9 H f ( 2-20)1 3432(Hashing Function)1 700 2 1218 5690 t 9 HB f (Figure 3-1:)1 460 1 658 5800 t 9 CW f (l i b c)3 204 1 1166 5800 t 9 H f ( 3-1)1 2457(Contents, Names without Synonyms)3 1450 2 1393 5800 t 9 HB f (Figure 3-2:)1 460 1 658 5910 t 9 CW f (l i b c)3 204 1 1166 5910 t 9 H f ( 3-1)1 2582(Contents, Names with Synonyms)3 1325 2 1393 5910 t 9 HB f (Figure 3-3:)1 460 1 658 6020 t 9 CW f (l i b c)3 204 1 1166 6020 t 9 H f ( 3-2)1 2272( External Data Symbols)3 940(Contents, Global)1 695 3 1393 6020 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (iii)5263 7324 w cleartomark showpage restore %%EndPage: 3 4 %%Page: 1 5 save mark 5 pagesetup 16 HB f 5458 516 658 516 Dl (Preface)658 682 w 14 HB f (ELF: Executable and Linking Format)4 2423 1 658 1062 t 10 PA f (The Executable and Linking Format was originally developed and published by UNIX System Labora-)13 4530 1 658 1302 t ( Tool Interface Standards committee)4 1602( The)1 217(tories \(USL\) as part of the Application Binary Interface \(ABI\).)9 2703 3 658 1422 t (\(TIS\) has selected the evolving ELF standard as a portable object \256le format that works on 32-bit Intel)17 4463 1 658 1542 t (Architecture environments for a variety of operating systems.)7 2726 1 658 1662 t (The ELF standard is intended to streamline software development by providing developers with a set of)15 4609 1 658 1842 t (binary interface de\256nitions that extend across multiple operating environments. This should reduce the)12 4570 1 658 1962 t (number of different interface implementations, thereby reducing the need for recoding and recompiling)12 4588 1 658 2082 t (code.)658 2202 w 14 HB f (About This Document)2 1450 1 658 2582 t 10 PA f (This document is intended for developers who are creating object or executable \256les on various 32-bit)15 4481 1 658 2822 t ( is divided into the following three parts:)7 1809( It)1 117(environment operating systems.)2 1426 3 658 2942 t 10 S f ()816 3122 w cleartomark restore %%BeginGlobal /build_bx { pop size 2 div /side exch def currentpoint newpath moveto 0 side rlineto side 0 rlineto 0 side neg rlineto closepath fill } def %%EndGlobal save mark 10 S f 816 3122 m 50 build_bx 866 3122 m 10 PA f ( the ELF object \256le format for the three main types of object \256les.)13 2846( describes)1 442(Part 1, ``Object Files'')3 931 3 932 3122 t 10 S f ()816 3302 w 816 3302 m 50 build_bx 866 3302 m 10 PA f ( the object \256le information and system)6 1691( describes)1 442( and Dynamic Linking'')3 1049( Loading)1 420(Part 2, ``Program)2 753 5 932 3302 t (actions that create running programs.)4 1663 1 932 3422 t 10 S f ()816 3602 w 816 3602 m 50 build_bx 866 3602 m 10 PA f ( the symbols contained in)4 1129( lists)1 208(Part 3, ``C Library'')3 847 3 932 3602 t 10 CW f (l i b s y s)5 335 1 3139 3602 t 10 PA f ( and)1 194( C)1 121(, the standard ANSI)3 882 3 3471 3602 t 10 CW f (l i b c)3 225 1 4691 3602 t 10 PA f (routines,)4938 3602 w (and the global data symbols required by the)7 1950 1 932 3722 t 10 CW f (l i b c)3 225 1 2905 3722 t 10 PA f (routines.)3152 3722 w /oldm /m load def /m {} def gsave newpath 658 -3942 moveto 928 -3942 lineto 928 -4242 lineto 658 -4242 lineto closepath 0.999 setgray fill grestore /m /oldm load def 7 HB f 928 3942 658 3942 Dl 928 4242 928 3942 Dl 658 4242 928 4242 Dl 658 3942 658 4242 Dl 799 4362 799 4242 Dl (NOTE)700 4110 w 9 H f (References to X86 architecture have been changed to Intel Architecture.)9 2880 1 1018 4002 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 782(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1)5293 7324 w cleartomark showpage restore %%EndPage: 1 5 %%Page: 1 6 save mark 6 pagesetup 16 HB f 5458 516 658 516 Dl 36 HB f (1)898 808 w 18 HB f (OBJECT FILES)1 1294 1 1378 682 t 9 HB f 5458 1626 658 1626 Dl 13 HB f (Introduction)1378 1740 w 9 H f (1-1)5170 1740 w 10 H f (File Format)1 506 1 1378 1860 t 9 H f (1-1)5170 1860 w 10 H f (Data Representation)1 921 1 1378 1980 t 9 H f (1-2)5170 1980 w 5458 2346 658 2346 Dl 13 HB f (ELF Header)1 724 1 1378 2460 t 9 H f (1-3)5170 2460 w 10 H f (ELF Identi\256cation)1 776 1 1378 2580 t 9 H f (1-5)5170 2580 w 10 H f (Machine Information)1 909 1 1378 2700 t 9 H f (1-7)5170 2700 w 5458 3066 658 3066 Dl 13 HB f (Sections)1378 3180 w 9 H f (1-8)5170 3180 w 10 H f (Special Sections)1 742 1 1378 3300 t 9 H f (1-13)5170 3300 w 5458 3666 658 3666 Dl 13 HB f (String Table)1 751 1 1378 3780 t 9 H f (1-16)5170 3780 w 5458 4146 658 4146 Dl 13 HB f (Symbol Table)1 846 1 1378 4260 t 9 H f (1-17)5170 4260 w 10 H f (Symbol Values)1 669 1 1378 4380 t 9 H f (1-20)5170 4380 w 5458 4746 658 4746 Dl 13 HB f (Relocation)1378 4860 w 9 H f (1-21)5170 4860 w 10 H f (Relocation Types)1 775 1 1378 4980 t 9 H f (1-22)5170 4980 w 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 736(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (i)5313 7324 w cleartomark showpage restore %%EndPage: 1 6 %%Page: 1 7 save mark 7 pagesetup 16 HB f 5458 516 658 516 Dl (Introduction)658 682 w 10 PA f ( are three)2 415( There)1 305(Part 1 describes the iABI object \256le format, called ELF \(Executable and Linking Format\).)13 3876 3 658 1042 t (main types of object \256les.)4 1115 1 658 1162 t 10 S f ()816 1342 w 816 1342 m 50 build_bx 866 1342 m 10 PA f (A)932 1342 w 10 PI f (relocatable \256le)1 570 1 1035 1342 t 10 PA f (holds code and data suitable for linking with other object \256les to create an execut-)14 3607 1 1630 1342 t (able or a shared object \256le.)5 1172 1 932 1462 t 10 S f ()816 1642 w 816 1642 m 50 build_bx 866 1642 m 10 PA f (An)932 1642 w 10 PI f (executable \256le)1 560 1 1093 1642 t 10 PA f (holds a program suitable for execution; the \256le speci\256es how)9 2682 1 1678 1642 t 10 CW f (e x e c)3 225 1 4383 1642 t 10 PA f (\(BA)4613 1642 w 10 S f (_)4785 1642 w 10 PA f (OS\) creates)1 495 1 4835 1642 t (a program's process image.)3 1211 1 932 1762 t 10 S f ()816 1942 w 816 1942 m 50 build_bx 866 1942 m 10 PA f (A)932 1942 w 10 PI f (shared object \256le)2 662 1 1035 1942 t 10 PA f ( the link editor [see)4 848( First,)1 275(holds code and data suitable for linking in two contexts.)9 2478 3 1722 1942 t 10 CW f (l d)1 115 1 930 2062 t 10 PA f (\(SD)1050 2062 w 10 S f (_)1213 2062 w 10 PA f (CMD\)] may process it with other relocatable and shared object \256les to create another object)14 4021 1 1263 2062 t ( the dynamic linker combines it with an executable \256le and other shared objects to)14 3622(\256le. Second,)1 557 2 932 2182 t (create a process image.)3 1015 1 932 2302 t (Created by the assembler and link editor, object \256les are binary representations of programs intended to)15 4601 1 658 2542 t ( that require other abstract machines, such as shell scripts, are)10 2723( Programs)1 481(execute directly on a processor.)4 1387 3 658 2662 t (excluded.)658 2782 w (After the introductory material, Part 1 focuses on the \256le format and how it pertains to building pro-)17 4438 1 658 2962 t ( 2 also describes parts of the object \256le, concentrating on the information necessary to execute)15 4118(grams. Part)1 534 2 658 3082 t (a program.)1 489 1 658 3202 t 14 HB f (File Format)1 754 1 658 3582 t 10 PA f (Object \256les participate in program linking \(building a program\) and program execution \(running a pro-)14 4576 1 658 3822 t ( convenience and ef\256ciency, the object \256le format provides parallel views of a \256le's contents,)14 4071(gram\). For)1 493 2 658 3942 t ( 1-1 shows an object \256le's organization.)6 1725( Figure)1 339(re\257ecting the differing needs of these activities.)6 2085 3 658 4062 t 8 HB f 5338 4222 658 4222 Dl 9 HB f ( File Format)2 510( Object)1 330(Figure 1-1:)1 460 3 658 4322 t 10 PA f ( View)1 257( Execution)1 1049(Linking View)1 604 3 2053 4514 t 10 S f ( ______________________)1 1059( _)1 200(_ _____________________)1 1084 3 1826 4534 t 10 PA f ( header)1 330( ELF)1 929(ELF header)1 508 3 2101 4654 t 10 S f ( ______________________)1 1059( _)1 200(_ _____________________)1 1084 3 1826 4674 t 10 PA f ( header table)2 570( Program)1 689(Program header table)2 959 3 1876 4794 t 10 PI f (optional)2192 4914 w 10 S f ( ______________________)1 1059( _)1 200(_ _____________________)1 1084 3 1826 4934 t 10 PA f (Section 1)1 395 1 2158 5054 t 10 S f (_ _____________________)1 1084 1 1826 5074 t 10 PA f (. . .)2 125 1 2293 5144 t (Segment 1)1 459 1 3385 5124 t 10 S f ( ______________________)1 1059( _)1 200(_ _____________________)1 1084 3 1826 5214 t 10 PA f (Section)2155 5334 w 10 PI f (n)2500 5334 w 10 S f (_ _____________________)1 1084 1 1826 5354 t 10 PA f (. . .)2 125 1 2293 5424 t (Segment 2)1 459 1 3385 5404 t 10 S f ( ______________________)1 1059( _)1 200(_ _____________________)1 1084 3 1826 5494 t 10 PA f ( . .)2 100( .)1 1159(. . .)2 125 3 2293 5564 t 10 S f ( ______________________)1 1059( _)1 200(_ _____________________)1 1084 3 1826 5634 t 10 PA f ( header table)2 570( Section)1 689(Section header table)2 890 3 1910 5754 t 10 PI f (optional)3451 5874 w 10 S f ( \347)1 -2343( ______________________)1 1059( _)1 200(_ _____________________)1 1084 4 1826 5894 t (\347)1826 5834 w (\347)1826 5734 w (\347)1826 5634 w (\347)1826 5534 w (\347)1826 5434 w (\347)1826 5334 w (\347)1826 5234 w (\347)1826 5134 w (\347)1826 5034 w (\347)1826 4934 w (\347)1826 4834 w (\347)1826 4734 w (\347)1826 4634 w (\347)2910 5894 w (\347)2910 5834 w (\347)2910 5734 w (\347)2910 5634 w (\347)2910 5534 w (\347)2910 5434 w (\347)2910 5334 w (\347)2910 5234 w (\347)2910 5134 w (\347)2910 5034 w (\347)2910 4934 w (\347)2910 4834 w (\347)2910 4734 w (\347)2910 4634 w (\347)3060 5894 w (\347)3060 5834 w (\347)3060 5734 w (\347)3060 5634 w (\347)3060 5534 w (\347)3060 5434 w (\347)3060 5334 w (\347)3060 5234 w (\347)3060 5134 w (\347)3060 5034 w (\347)3060 4934 w (\347)3060 4834 w (\347)3060 4734 w (\347)3060 4634 w (\347)4169 5894 w (\347)4169 5834 w (\347)4169 5734 w (\347)4169 5634 w (\347)4169 5534 w (\347)4169 5434 w (\347)4169 5334 w (\347)4169 5234 w (\347)4169 5134 w (\347)4169 5034 w (\347)4169 4934 w (\347)4169 4834 w (\347)4169 4734 w (\347)4169 4634 w 8 PA f 5338 6086 658 6086 Dl 10 PA f (An)658 6386 w 10 PI f (ELF header)1 459 1 819 6386 t 10 PA f (resides at the beginning and holds a ``road map'' describing the \256le's organization.)12 3656 1 1303 6386 t 10 PI f (Sec-)5009 6386 w (tions)658 6506 w 10 PA f (hold the bulk of object \256le information for the linking view: instructions, data, symbol table, reloca-)15 4383 1 883 6506 t ( 2 discusses)2 510( Part)1 233( of special sections appear later in Part 1.)8 1794( Descriptions)1 607(tion information, and so on.)4 1232 5 658 6626 t 10 PI f (seg-)5059 6626 w (ments)658 6746 w 10 PA f (and the program execution view of the \256le.)7 1905 1 928 6746 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-1)5218 7324 w cleartomark showpage restore %%EndPage: 1 7 %%Page: 2 8 save mark 8 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 10 PA f (A)540 1020 w 10 PI f (program header table)2 845 1 643 1020 t 10 PA f ( used to build a pro-)5 896( Files)1 254(, if present, tells the system how to create a process image.)11 2569 3 1496 1020 t ( A)1 128(cess image \(execute a program\) must have a program header table; relocatable \256les do not need one.)16 4428 2 540 1140 t 10 PI f (section header table)2 781 1 540 1260 t 10 PA f ( section has an entry in the)6 1178( Every)1 311(contains information describing the \256le's sections.)5 2207 3 1346 1260 t ( used during link-)3 795( Files)1 254(table; each entry gives information such as the section name, the section size, etc.)13 3564 3 540 1380 t (ing must have a section header table; other object \256les may or may not have one.)15 3556 1 540 1500 t /oldm /m load def /m {} def gsave newpath 540 -1660 moveto 810 -1660 lineto 810 -1960 lineto 540 -1960 lineto closepath 0.999 setgray fill grestore /m /oldm load def 7 HB f 810 1660 540 1660 Dl 810 1960 810 1660 Dl 540 1960 810 1960 Dl 540 1660 540 1960 Dl 681 2080 681 1960 Dl (NOTE)582 1828 w 9 H f (Although the \256gure shows the program header table immediately after the ELF header, and the section)15 4085 1 900 1720 t ( sections and segments have no)5 1290( Moreover,)1 455(header table following the sections, actual \256les may differ.)8 2300 3 900 1820 t ( the ELF header has a \256xed position in the \256le.)10 1850( Only)1 235(speci\256ed order.)1 615 3 900 1920 t 14 HB f (Data Representation)1 1359 1 540 2480 t 10 PA f (As described here, the object \256le)5 1427 1 540 2720 t 10 PI f (format)1992 2720 w 10 PA f (supports various processors with 8-bit bytes and 32-bit architec-)8 2827 1 2283 2720 t ( \256les there-)2 490( Object)1 332( it is intended to be extensible to larger \(or smaller\) architectures.)11 2869(tures. Nevertheless,)1 898 4 540 2840 t (fore represent some control data with a machine-independent format, making it possible to identify)13 4400 1 540 2960 t ( data in an object \256le use the encod-)8 1573( Remaining)1 533(object \256les and interpret their contents in a common way.)9 2539 3 540 3080 t (ing of the target processor, regardless of the machine on which the \256le was created.)14 3675 1 540 3200 t 8 HB f 5220 3360 540 3360 Dl 9 HB f ( Data Types)2 505( 32-Bit)1 300(Figure 1-2:)1 460 3 540 3460 t 10 PA f ( Purpose)1 939( Alignment)1 627(Name Size)1 822 3 1585 3652 t 10 S f (_ ____________________________________________________________)1 3035 1 1362 3672 t 10 CW f (E l f 3 2 _ A d d r)9 555 1 1360 3792 t 10 PA f ( program address)2 783( Unsigned)1 794(4 4)1 528 3 2292 3792 t 10 CW f (E l f 3 2 _ H a l f)9 555 1 1360 3912 t 10 PA f ( medium integer)2 736( Unsigned)1 794(2 2)1 528 3 2292 3912 t 10 CW f (E l f 3 2 _ O f f)8 500 1 1360 4032 t 10 PA f ( \256le offset)2 432( Unsigned)1 794(4 4)1 528 3 2292 4032 t 10 CW f (E l f 3 2 _ S w o r d)10 610 1 1360 4152 t 10 PA f ( large integer)2 585( Signed)1 669(4 4)1 528 3 2292 4152 t 10 CW f (E l f 3 2 _ W o r d)9 555 1 1360 4272 t 10 PA f ( large integer)2 585( Unsigned)1 794(4 4)1 528 3 2292 4272 t 10 CW f ( h a r)3 165( c)1 110(u n s i g n e d)7 445 3 1360 4392 t 10 PA f ( small integer)2 600( Unsigned)1 794(1 1)1 528 3 2292 4392 t 10 S f ( \347)1 -2245(_ ____________________________________________________________)1 3035 2 1362 4448 t (\347)2152 4372 w (\347)2152 4272 w (\347)2152 4172 w (\347)2152 4072 w (\347)2152 3972 w (\347)2152 3872 w (\347)2152 3772 w (\347)2482 4448 w (\347)2482 4372 w (\347)2482 4272 w (\347)2482 4172 w (\347)2482 4072 w (\347)2482 3972 w (\347)2482 3872 w (\347)2482 3772 w (\347)3109 4448 w (\347)3109 4372 w (\347)3109 4272 w (\347)3109 4172 w (\347)3109 4072 w (\347)3109 3972 w (\347)3109 3872 w (\347)3109 3772 w 8 PA f 5220 4640 540 4640 Dl 10 PA f (All data structures that the object \256le format de\256nes follow the ``natural'' size and alignment guidelines)15 4575 1 540 4880 t ( necessary, data structures contain explicit padding to ensure 4-byte alignment for)11 3626( If)1 117(for the relevant class.)3 936 3 540 5000 t ( also have suitable alignment from the)6 1688( Data)1 260(4-byte objects, to force structure sizes to a multiple of 4, etc.)11 2621 3 540 5120 t ( for example, a structure containing an)6 1706( Thus,)1 296(beginning of the \256le.)3 912 3 540 5240 t 10 CW f (E l f 3 2 _ A d d r)9 555 1 3477 5240 t 10 PA f (member will be aligned)3 1046 1 4062 5240 t (on a 4-byte boundary within the \256le.)6 1615 1 540 5360 t (For portability reasons, ELF uses no bit-\256elds.)6 2029 1 540 5540 t 9 R f (1-2)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 2 8 %%Page: 3 9 save mark 9 pagesetup 16 HB f 5458 516 658 516 Dl (ELF Header)1 893 1 658 682 t 10 PA f ( the)1 164( If)1 117(Some object \256le control structures can grow, because the ELF header contains their actual sizes.)14 4205 3 658 1042 t (object \256le format changes, a program may encounter control structures that are larger or smaller than)15 4479 1 658 1162 t ( treatment of ``missing'' informa-)4 1461( The)1 217( might therefore ignore ``extra'' information.)5 1966(expected. Programs)1 900 4 658 1282 t (tion depends on context and will be speci\256ed when and if extensions are de\256ned.)13 3592 1 658 1402 t 8 HB f 5338 1562 658 1562 Dl 9 HB f ( Header)1 330( ELF)1 220(Figure 1-3:)1 460 3 658 1662 t /oldm /m load def /m {} def gsave 766 -1958 moveto 766 -3938 946 -3938 180 arcto 4 {pop} repeat 5266 -3938 5266 -3758 180 arcto 4 {pop} repeat 5266 -1778 5086 -1778 180 arcto 4 {pop} repeat 766 -1778 766 -1958 180 arcto 4 {pop} repeat 0.999 setgray fill grestore /m /oldm load def 8 CW f 766 3758 766 1958 Dl 766 3758 180 0 0 180 Da 5086 3938 946 3938 Dl 5086 3938 0 -180 180 0 Da 5266 1958 5266 3758 Dl 5266 1958 -180 0 0 -180 Da 946 1778 5086 1778 Dl 946 1778 0 180 -180 0 Da ( 6)1 44( 1)1 376( I _ N I D E N T)8 352( E)1 88(# d e f i n e)6 312 5 908 2058 t ( {)1 88( t r u c t)5 220( s)1 88(t y p e d e f)6 312 4 908 2258 t ( _ i d e n t [ E I _ N I D E N T ] ;)18 792( e)1 192( h a r)3 132( c)1 88(u n s i g n e d)7 356 5 1268 2358 t ( _ t y p e ;)6 264( e)1 324(E l f 3 2 _ H a l f)9 444 3 1268 2458 t ( _ m a c h i n e ;)9 396( e)1 324(E l f 3 2 _ H a l f)9 444 3 1268 2558 t ( _ v e r s i o n ;)9 396( e)1 324(E l f 3 2 _ W o r d)9 444 3 1268 2658 t ( _ e n t r y ;)7 308( e)1 324(E l f 3 2 _ A d d r)9 444 3 1268 2758 t ( _ p h o f f ;)7 308( e)1 368(E l f 3 2 _ O f f)8 400 3 1268 2858 t ( _ s h o f f ;)7 308( e)1 368(E l f 3 2 _ O f f)8 400 3 1268 2958 t ( _ f l a g s ;)7 308( e)1 324(E l f 3 2 _ W o r d)9 444 3 1268 3058 t ( _ e h s i z e ;)8 352( e)1 324(E l f 3 2 _ H a l f)9 444 3 1268 3158 t ( _ p h e n t s i z e ;)11 484( e)1 324(E l f 3 2 _ H a l f)9 444 3 1268 3258 t ( _ p h n u m ;)7 308( e)1 324(E l f 3 2 _ H a l f)9 444 3 1268 3358 t ( _ s h e n t s i z e ;)11 484( e)1 324(E l f 3 2 _ H a l f)9 444 3 1268 3458 t ( _ s h n u m ;)7 308( e)1 324(E l f 3 2 _ H a l f)9 444 3 1268 3558 t ( _ s h s t r n d x ;)10 440( e)1 324(E l f 3 2 _ H a l f)9 444 3 1268 3658 t ( l f 3 2 _ E h d r ;)10 440(} E)1 136 2 908 3758 t 5338 4066 658 4066 Dl 10 CW f (e_ident)658 4306 w 10 PA f (The initial bytes mark the \256le as an object \256le and provide machine-independent data)13 3772 1 1486 4306 t ( descriptions appear)2 899( Complete)1 482(with which to decode and interpret the \256le's contents.)8 2381 3 1486 4426 t (below, in ``ELF Identi\256cation.'')3 1365 1 1486 4546 t 10 CW f (e_type)658 4726 w 10 PA f (This member identi\256es the object \256le type.)6 1873 1 1486 4726 t ( Meaning)1 792(Name Value)1 864 2 2553 4906 t 10 S f (_ _______________________________________)1 1988 1 2418 4926 t 10 CW f (ET_NONE 0)1 1050 1 2418 5046 t 10 PA f (No \256le type)2 523 1 3618 5046 t 10 CW f (ET_REL 1)1 1050 1 2418 5166 t 10 PA f (Relocatable \256le)1 671 1 3618 5166 t 10 CW f (ET_EXEC 2)1 1050 1 2418 5286 t 10 PA f (Executable \256le)1 643 1 3618 5286 t 10 CW f (ET_DYN 3)1 1050 1 2418 5406 t 10 PA f (Shared object \256le)2 756 1 3618 5406 t 10 CW f (ET_CORE 4)1 1050 1 2418 5526 t 10 PA f (Core \256le)1 377 1 3618 5526 t 10 CW f (ET_LOPROC 0xff00)1 1050 1 2418 5646 t 10 PA f (Processor-speci\256c)3618 5646 w 10 CW f (ET_HIPROC 0xffff)1 1050 1 2418 5766 t 10 PA f (Processor-speci\256c)3618 5766 w 10 S f ( \347)1 -1373(_ _______________________________________)1 1988 2 2418 5822 t (\347)3033 5726 w (\347)3033 5626 w (\347)3033 5526 w (\347)3033 5426 w (\347)3033 5326 w (\347)3033 5226 w (\347)3033 5126 w (\347)3033 5026 w (\347)3543 5822 w (\347)3543 5726 w (\347)3543 5626 w (\347)3543 5526 w (\347)3543 5426 w (\347)3543 5326 w (\347)3543 5226 w (\347)3543 5126 w (\347)3543 5026 w 10 PA f (Although the core \256le contents are unspeci\256ed, type)7 2308 1 1486 6002 t 10 CW f (ET_CORE)3819 6002 w 10 PA f (is reserved to mark the)4 1015 1 4272 6002 t ( from)1 241(\256le. Values)1 514 2 1486 6122 t 10 CW f (ET_LOPROC)2266 6122 w 10 PA f (through)2839 6122 w 10 CW f (ET_HIPROC)3224 6122 w 10 PA f (\(inclusive\) are reserved for)3 1185 1 3797 6122 t ( values are reserved and will be assigned to new)9 2136( Other)1 308(processor-speci\256c semantics.)1 1271 3 1486 6242 t (object \256le types as necessary.)4 1280 1 1486 6362 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-3)5218 7324 w cleartomark showpage restore %%EndPage: 3 9 %%Page: 4 10 save mark 10 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 10 CW f (e_machine)540 1020 w 10 PA f (This member's value speci\256es the required architecture for an individual \256le.)10 3403 1 1368 1020 t ( Meaning)1 716(Name Value)1 784 2 2510 1200 t 10 S f (_ ___________________________________)1 1778 1 2405 1220 t 10 CW f (EM_NONE 0)1 789 1 2405 1340 t 10 PA f (No machine)1 538 1 3444 1340 t 10 CW f (EM_M32 1)1 789 1 2405 1460 t 10 PA f (AT&T WE 32100)2 739 1 3444 1460 t 10 CW f (EM_SPARC 2)1 789 1 2405 1580 t 10 PA f (SPARC)3444 1580 w 10 CW f (EM_386 3)1 789 1 2405 1700 t 10 PA f (Intel 80386)1 477 1 3444 1700 t 10 CW f (EM_68K 4)1 789 1 2405 1820 t 10 PA f (Motorola 68000)1 687 1 3444 1820 t 10 CW f (EM_88K 5)1 789 1 2405 1940 t 10 PA f (Motorola 88000)1 687 1 3444 1940 t 10 CW f (EM_860 7)1 789 1 2405 2060 t 10 PA f (Intel 80860)1 477 1 3444 2060 t 10 CW f (EM_MIPS 8)1 789 1 2405 2180 t 10 PA f (MIPS RS3000)1 587 1 3444 2180 t 10 S f ( \347)1 -1223(_ ___________________________________)1 1778 2 2405 2236 t (\347)2960 2220 w (\347)2960 2120 w (\347)2960 2020 w (\347)2960 1920 w (\347)2960 1820 w (\347)2960 1720 w (\347)2960 1620 w (\347)2960 1520 w (\347)2960 1420 w (\347)2960 1320 w (\347)3369 2236 w (\347)3369 2220 w (\347)3369 2120 w (\347)3369 2020 w (\347)3369 1920 w (\347)3369 1820 w (\347)3369 1720 w (\347)3369 1620 w (\347)3369 1520 w (\347)3369 1420 w (\347)3369 1320 w 10 PA f (Other values are reserved and will be assigned to new machines as necessary.)12 3431 1 1368 2416 t ( example,)1 425( For)1 201(Processor-speci\256c ELF names use the machine name to distinguish them.)9 3221 3 1368 2536 t (the \257ags mentioned below use the pre\256x)6 1796 1 1368 2656 t 10 CW f (EF_)3189 2656 w 10 PA f (; a \257ag named)3 622 1 3377 2656 t 10 CW f (WIDGET)4024 2656 w 10 PA f (for the)1 292 1 4417 2656 t 10 CW f (EM_XYZ)4734 2656 w 10 PA f (machine would be called)3 1102 1 1368 2776 t 10 CW f (EF_XYZ_WIDGET)2495 2776 w 10 PA f (.)3283 2776 w 10 CW f (e_version)540 2956 w 10 PA f (This member identi\256es the object \256le version.)6 2004 1 1368 2956 t ( Meaning)1 698(Name Value)1 844 2 2528 3136 t 10 S f (_ _____________________________________)1 1862 1 2363 3156 t 10 CW f (EV_NONE 0)1 909 1 2363 3276 t 10 PA f (Invalid version)1 670 1 3522 3276 t 10 CW f (EV_CURRENT 1)1 909 1 2363 3396 t 10 PA f (Current version)1 703 1 3522 3396 t 10 S f ( \347)1 -1187(_ _____________________________________)1 1862 2 2363 3452 t (\347)3038 3356 w (\347)3038 3256 w (\347)3447 3452 w (\347)3447 3356 w (\347)3447 3256 w 10 PA f (The value)1 435 1 1368 3632 t 10 CW f (1)1828 3632 w 10 PA f (signi\256es the original \256le format; extensions will create new versions with)10 3222 1 1921 3632 t ( value of)2 381( The)1 217(higher numbers.)1 730 3 1368 3752 t 10 CW f (EV_CURRENT)2721 3752 w 10 PA f (, though given as)3 759 1 3329 3752 t 10 CW f (1)4113 3752 w 10 PA f (above, will change as)3 940 1 4206 3752 t (necessary to re\257ect the current version number.)6 2104 1 1368 3872 t 10 CW f (e_entry)540 4052 w 10 PA f (This member gives the virtual address to which the system \256rst transfers control, thus)13 3795 1 1368 4052 t ( the \256le has no associated entry point, this member holds zero.)11 2756( If)1 117(starting the process.)2 886 3 1368 4172 t 10 CW f (e_phoff)540 4352 w 10 PA f ( the \256le has no)4 640( If)1 117(This member holds the program header table's \256le offset in bytes.)10 2898 3 1368 4352 t (program header table, this member holds zero.)6 2076 1 1368 4472 t 10 CW f (e_shoff)540 4652 w 10 PA f ( the \256le has no sec-)5 832( If)1 117(This member holds the section header table's \256le offset in bytes.)10 2818 3 1368 4652 t (tion header table, this member holds zero.)6 1862 1 1368 4772 t 10 CW f (e_flags)540 4952 w 10 PA f ( names take)2 523( Flag)1 241(This member holds processor-speci\256c \257ags associated with the \256le.)8 2957 3 1368 4952 t (the form)1 380 1 1368 5072 t 10 CW f (EF_)1773 5072 w 10 PI f (machine)1953 5072 w 10 CW f (_)2289 5072 w 10 PI f (\257ag)2349 5072 w 10 PA f ( ``Machine Information'' for \257ag de\256nitions.)5 1946(. See)1 224 2 2497 5072 t 10 CW f (e_ehsize)540 5252 w 10 PA f (This member holds the ELF header's size in bytes.)8 2209 1 1368 5252 t 10 CW f (e_phentsize)540 5432 w 10 PA f (This member holds the size in bytes of one entry in the \256le's program header table; all)16 3791 1 1368 5432 t (entries are the same size.)4 1097 1 1368 5552 t 10 CW f (e_phnum)540 5732 w 10 PA f ( the pro-)2 377( Thus)1 271(This member holds the number of entries in the program header table.)11 3111 3 1368 5732 t (duct of)1 311 1 1368 5852 t 10 CW f (e_phentsize)1704 5852 w 10 PA f (and)2397 5852 w 10 CW f (e_phnum)2591 5852 w 10 PA f ( a \256le has no pro-)5 764( If)1 117(gives the table's size in bytes.)5 1295 3 3044 5852 t (gram header table,)2 829 1 1368 5972 t 10 CW f (e_phnum)2222 5972 w 10 PA f (holds the value zero.)3 920 1 2675 5972 t 10 CW f (e_shentsize)540 6152 w 10 PA f ( section header is one entry in)6 1318( A)1 128(This member holds a section header's size in bytes.)8 2251 3 1368 6152 t (the section header table; all entries are the same size.)9 2323 1 1368 6272 t 10 CW f (e_shnum)540 6452 w 10 PA f ( the product)2 542( Thus)1 271(This member holds the number of entries in the section header table.)11 3031 3 1368 6452 t (of)1368 6572 w 10 CW f (e_shentsize)1481 6572 w 10 PA f (and)2174 6572 w 10 CW f (e_shnum)2368 6572 w 10 PA f ( a \256le)2 238( If)1 117(gives the section header table's size in bytes.)7 1959 3 2821 6572 t (has no section header table,)4 1217 1 1368 6692 t 10 CW f (e_shnum)2610 6692 w 10 PA f (holds the value zero.)3 920 1 3063 6692 t 9 R f (1-4)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 4 10 %%Page: 5 11 save mark 11 pagesetup 9 HB f 3841 540 658 540 Dl (ELF: Executable and Linkable Format)4 1605 1 3913 540 t 10 CW f (e_shstrndx)658 1020 w 10 PA f (This member holds the section header table index of the entry associated with the sec-)14 3793 1 1486 1020 t ( the \256le has no section name string table, this member holds)11 2640( If)1 117(tion name string table.)3 992 3 1486 1140 t (the value)1 407 1 1486 1260 t 10 CW f (SHN_UNDEF)1918 1260 w 10 PA f ( ``Sections'' and ``String Table'' below for more informa-)8 2482(. See)1 224 2 2466 1260 t (tion.)1486 1380 w 14 HB f (ELF Identi\256cation)1 1171 1 658 1820 t 10 PA f (As mentioned above, ELF provides an object \256le framework to support multiple processors, multiple data)14 4680 1 658 2060 t ( support this object \256le family, the initial bytes of the \256le)11 2488( To)1 166(encodings, and multiple classes of machines.)5 1973 3 658 2180 t (specify how to interpret the \256le, independent of the processor on which the inquiry is made and indepen-)17 4661 1 658 2300 t (dent of the \256le's remaining contents.)5 1612 1 658 2420 t (The initial bytes of an ELF header \(and an object \256le\) correspond to the)13 3131 1 658 2600 t 10 CW f (e_ident)3814 2600 w 10 PA f (member.)4267 2600 w 8 HB f 5338 2760 658 2760 Dl 9 HB f (Figure 1-4:)1 460 1 658 2860 t 9 CW f (e_ident[ ])1 516 1 1168 2860 t 9 HB f (Identi\256cation Indexes)1 920 1 1709 2860 t 10 PA f ( Purpose)1 823(Name Value)1 844 2 2093 3052 t 10 S f (_ __________________________________________)1 2140 1 1928 3072 t 10 CW f (EI_MAG0 0)1 939 1 1928 3192 t 10 PA f (File identi\256cation)1 775 1 3087 3192 t 10 CW f (EI_MAG1 1)1 939 1 1928 3312 t 10 PA f (File identi\256cation)1 775 1 3087 3312 t 10 CW f (EI_MAG2 2)1 939 1 1928 3432 t 10 PA f (File identi\256cation)1 775 1 3087 3432 t 10 CW f (EI_MAG3 3)1 939 1 1928 3552 t 10 PA f (File identi\256cation)1 775 1 3087 3552 t 10 CW f (EI_CLASS 4)1 939 1 1928 3672 t 10 PA f (File class)1 394 1 3087 3672 t 10 CW f (EI_DATA 5)1 939 1 1928 3792 t 10 PA f (Data encoding)1 644 1 3087 3792 t 10 CW f (EI_VERSION 6)1 939 1 1928 3912 t 10 PA f (File version)1 515 1 3087 3912 t 10 CW f (EI_PAD 7)1 939 1 1928 4032 t 10 PA f (Start of padding bytes)3 981 1 3087 4032 t 10 CW f (EI_NIDENT 16)1 939 1 1928 4152 t 10 PA f (Size of)1 293 1 3087 4152 t 10 CW f (e_ident[])3405 4152 w 10 S f ( \347)1 -1465(_ __________________________________________)1 2140 2 1928 4208 t (\347)2603 4172 w (\347)2603 4072 w (\347)2603 3972 w (\347)2603 3872 w (\347)2603 3772 w (\347)2603 3672 w (\347)2603 3572 w (\347)2603 3472 w (\347)2603 3372 w (\347)2603 3272 w (\347)2603 3172 w (\347)3012 4208 w (\347)3012 4172 w (\347)3012 4072 w (\347)3012 3972 w (\347)3012 3872 w (\347)3012 3772 w (\347)3012 3672 w (\347)3012 3572 w (\347)3012 3472 w (\347)3012 3372 w (\347)3012 3272 w (\347)3012 3172 w 8 PA f 5338 4400 658 4400 Dl 10 PA f (These indexes access bytes that hold the following values.)8 2552 1 658 4640 t 10 CW f (EI_MAG0)658 4820 w 10 PA f (to)1103 4820 w 10 CW f (EI_MAG3)1216 4820 w 10 PA f (A \256le's \256rst 4 bytes hold a ``magic number,'' identifying the \256le as an ELF object \256le.)16 3718 1 1408 4940 t ( Position)1 810(Name Value)1 754 2 2478 5120 t 10 S f (_ ______________________________________)1 1939 1 2403 5140 t 10 CW f ( e_ident[EI_MAG0])1 1120(ELFMAG0 0x7f)1 819 2 2403 5260 t ( e_ident[EI_MAG1])1 1150(ELFMAG1 'E')1 789 2 2403 5380 t ( e_ident[EI_MAG2])1 1150(ELFMAG2 'L')1 789 2 2403 5500 t ( e_ident[EI_MAG3])1 1150(ELFMAG3 'F')1 789 2 2403 5620 t 10 S f ( \347)1 -1444(_ ______________________________________)1 1939 2 2403 5676 t (\347)2898 5640 w (\347)2898 5540 w (\347)2898 5440 w (\347)2898 5340 w (\347)2898 5240 w (\347)3307 5676 w (\347)3307 5640 w (\347)3307 5540 w (\347)3307 5440 w (\347)3307 5340 w (\347)3307 5240 w 10 CW f (EI_CLASS)658 6036 w 10 PA f (The next byte,)2 625 1 1408 6036 t 10 CW f (e_ident[EI_CLASS])2058 6036 w 10 PA f (, identi\256es the \256le's class, or capacity.)6 1649 1 3086 6036 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-5)5218 7324 w cleartomark showpage restore %%EndPage: 5 11 %%Page: 6 12 save mark 12 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 10 PA f ( Meaning)1 634(Name Value)1 904 2 2553 1020 t 10 S f (_ _____________________________________)1 1854 1 2328 1040 t 10 CW f (ELFCLASSNONE 0)1 1029 1 2328 1160 t 10 PA f (Invalid class)1 549 1 3607 1160 t 10 CW f (ELFCLASS32 1)1 1029 1 2328 1280 t 10 PA f (32-bit objects)1 575 1 3607 1280 t 10 CW f (ELFCLASS64 2)1 1029 1 2328 1400 t 10 PA f (64-bit objects)1 575 1 3607 1400 t 10 S f ( \347)1 -1059(_ _____________________________________)1 1854 2 2328 1420 t (\347)3123 1340 w (\347)3123 1240 w (\347)3123 1140 w (\347)3532 1420 w (\347)3532 1340 w (\347)3532 1240 w (\347)3532 1140 w 10 PA f (The \256le format is designed to be portable among machines of various sizes, without)13 3695 1 1290 1600 t ( Class)1 284(imposing the sizes of the largest machine on the smallest.)9 2530 2 1290 1720 t 10 CW f (ELFCLASS32)4129 1720 w 10 PA f (supports)4762 1720 w (machines with \256les and virtual address spaces up to 4 gigabytes; it uses the basic types)15 3831 1 1290 1840 t (de\256ned above.)1 651 1 1290 1960 t (Class)1290 2140 w 10 CW f (ELFCLASS64)1549 2140 w 10 PA f ( appearance here shows how)4 1278( Its)1 159(is reserved for 64-bit architectures.)4 1526 3 2182 2140 t ( classes)1 322( Other)1 308(the object \256le may change, but the 64-bit format is otherwise unspeci\256ed.)11 3222 3 1290 2260 t (will be de\256ned as necessary, with different basic types and sizes for object \256le data.)14 3673 1 1290 2380 t 10 CW f (EI_DATA)540 2560 w 10 PA f (Byte)1290 2560 w 10 CW f (e_ident[EI_DATA])1513 2560 w 10 PA f (speci\256es the data encoding of the processor-speci\256c data in)8 2611 1 2506 2560 t ( following encodings are currently de\256ned.)5 1911( The)1 217(the object \256le.)2 610 3 1290 2680 t ( Meaning)1 832(Name Value)1 874 2 2355 2860 t 10 S f (_ ___________________________________________)1 2189 1 2160 2880 t 10 CW f (ELFDATANONE 0)1 969 1 2160 3000 t 10 PA f (Invalid data encoding)2 970 1 3379 3000 t 10 CW f (ELFDATA2LSB 1)1 969 1 2160 3120 t 10 PA f (See below)1 444 1 3379 3120 t 10 CW f (ELFDATA2MSB 2)1 969 1 2160 3240 t 10 PA f (See below)1 444 1 3379 3240 t 10 S f ( \347)1 -1454(_ ___________________________________________)1 2189 2 2160 3260 t (\347)2895 3180 w (\347)2895 3080 w (\347)2895 2980 w (\347)3304 3260 w (\347)3304 3180 w (\347)3304 3080 w (\347)3304 2980 w 10 PA f ( values are reserved and)4 1075( Other)1 308(More information on these encodings appears below.)6 2354 3 1290 3440 t (will be assigned to new encodings as necessary.)7 2107 1 1290 3560 t 10 CW f (EI_VERSION)540 3740 w 10 PA f (Byte)1290 3740 w 10 CW f (e_ident[EI_VERSION])1513 3740 w 10 PA f ( this)1 187( Currently,)1 510(speci\256es the ELF header version number.)5 1823 3 2686 3740 t (value must be)2 619 1 1290 3860 t 10 CW f (EV_CURRENT)1934 3860 w 10 PA f (, as explained above for)4 1044 1 2542 3860 t 10 CW f (e_version)3611 3860 w 10 PA f (.)4159 3860 w 10 CW f (EI_PAD)540 4040 w 10 PA f (This value marks the beginning of the unused bytes in)9 2397 1 1290 4040 t 10 CW f (e_ident)3712 4040 w 10 PA f ( bytes are)2 422(. These)1 332 2 4140 4040 t ( value)1 268( The)1 217(reserved and set to zero; programs that read object \256les should ignore them.)12 3366 3 1290 4160 t (of)1290 4280 w 10 CW f (EI_PAD)1403 4280 w 10 PA f (will change in the future if currently unused bytes are given meanings.)11 3131 1 1796 4280 t ( described above, class)3 999( As)1 170(A \256le's data encoding speci\256es how to interpret the basic objects in a \256le.)13 3220 3 540 4520 t 10 CW f (ELFCLASS32)540 4640 w 10 PA f ( the de\256ned encodings, objects are)5 1515( Under)1 335(\256les use objects that occupy 1, 2, and 4 bytes.)9 1976 3 1173 4640 t ( numbers appear in the upper left corners.)7 1863( Byte)1 248(represented as shown below.)3 1284 3 540 4760 t (Encoding)540 4940 w 10 CW f (ELFDATA2LSB)987 4940 w 10 PA f (speci\256es 2's complement values, with the least signi\256cant byte occupying the)10 3402 1 1680 4940 t (lowest address.)1 684 1 540 5060 t 8 HB f 5220 5220 540 5220 Dl 9 HB f ( Encoding)1 435( Data)1 245(Figure 1-5:)1 460 3 540 5320 t 9 CW f (ELFDATA2LSB)1705 5320 w 10 PA f 2167 5512 2167 5728 Dl 2642 5512 2167 5512 Dl 2642 5728 2642 5512 Dl 2167 5728 2642 5728 Dl 10 CW f (01)2344 5640 w 6 PA f (0)2177 5568 w 10 CW f (0x01)1747 5640 w 2167 5800 2167 6016 Dl 2642 5800 2167 5800 Dl 2642 6016 2642 5800 Dl 2167 6016 2642 6016 Dl (02)2344 5928 w 6 PA f (0)2177 5856 w 10 PA f 2642 5800 2642 6016 Dl 3117 5800 2642 5800 Dl 3117 6016 3117 5800 Dl 2642 6016 3117 6016 Dl 10 CW f (01)2820 5928 w 6 PA f (1)2652 5856 w 10 CW f (0x0102)1627 5928 w 2167 6088 2167 6304 Dl 2642 6088 2167 6088 Dl 2642 6304 2642 6088 Dl 2167 6304 2642 6304 Dl (04)2344 6216 w 6 PA f (0)2177 6144 w 10 PA f 2642 6088 2642 6304 Dl 3117 6088 2642 6088 Dl 3117 6304 3117 6088 Dl 2642 6304 3117 6304 Dl 10 CW f (03)2820 6216 w 6 PA f (1)2652 6144 w 10 PA f 3117 6088 3117 6304 Dl 3592 6088 3117 6088 Dl 3592 6304 3592 6088 Dl 3117 6304 3592 6304 Dl 10 CW f (02)3295 6216 w 6 PA f (2)3127 6144 w 10 PA f 3592 6088 3592 6304 Dl 4067 6088 3592 6088 Dl 4068 6304 4068 6088 Dl 3593 6304 4068 6304 Dl 10 CW f (01)3770 6216 w 6 PA f (3)3602 6144 w 10 CW f (0x01020304)1387 6216 w 8 PA f 5220 6496 540 6496 Dl 9 R f (1-6)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 6 12 %%Page: 7 13 save mark 13 pagesetup 9 HB f 3841 540 658 540 Dl (ELF: Executable and Linkable Format)4 1605 1 3913 540 t 10 PA f (Encoding)658 1020 w 10 CW f (ELFDATA2MSB)1105 1020 w 10 PA f (speci\256es 2's complement values, with the most signi\256cant byte occupying the)10 3418 1 1798 1020 t (lowest address.)1 684 1 658 1140 t 8 HB f 5338 1300 658 1300 Dl 9 HB f ( Encoding)1 435( Data)1 245(Figure 1-6:)1 460 3 658 1400 t 9 CW f (ELFDATA2MSB)1823 1400 w 10 PA f 2285 1592 2285 1808 Dl 2760 1592 2285 1592 Dl 2760 1808 2760 1592 Dl 2285 1808 2760 1808 Dl 10 CW f (01)2462 1720 w 6 PA f (0)2295 1648 w 10 CW f (0x01)1865 1720 w 2285 1880 2285 2096 Dl 2760 1880 2285 1880 Dl 2760 2096 2760 1880 Dl 2285 2096 2760 2096 Dl (01)2462 2008 w 6 PA f (0)2295 1936 w 10 PA f 2760 1880 2760 2096 Dl 3235 1880 2760 1880 Dl 3235 2096 3235 1880 Dl 2760 2096 3235 2096 Dl 10 CW f (02)2938 2008 w 6 PA f (1)2770 1936 w 10 CW f (0x0102)1745 2008 w 2285 2168 2285 2384 Dl 2760 2168 2285 2168 Dl 2760 2384 2760 2168 Dl 2285 2384 2760 2384 Dl (01)2462 2296 w 6 PA f (0)2295 2224 w 10 PA f 2760 2168 2760 2384 Dl 3235 2168 2760 2168 Dl 3235 2384 3235 2168 Dl 2760 2384 3235 2384 Dl 10 CW f (02)2938 2296 w 6 PA f (1)2770 2224 w 10 PA f 3235 2168 3235 2384 Dl 3710 2168 3235 2168 Dl 3710 2384 3710 2168 Dl 3235 2384 3710 2384 Dl 10 CW f (03)3413 2296 w 6 PA f (2)3245 2224 w 10 PA f 3710 2168 3710 2384 Dl 4185 2168 3710 2168 Dl 4186 2384 4186 2168 Dl 3711 2384 4186 2384 Dl 10 CW f (04)3888 2296 w 6 PA f (3)3720 2224 w 10 CW f (0x01020304)1505 2296 w 8 PA f 5338 2576 658 2576 Dl 14 HB f (Machine Information)1 1366 1 658 3016 t 10 PA f (For \256le identi\256cation in)3 1039 1 658 3256 t 10 CW f (e_ident)1722 3256 w 10 PA f (, the 32-bit Intel Architecture requires the following values.)8 2610 1 2150 3256 t 8 HB f 5338 3416 658 3416 Dl 9 HB f ( Intel Architecture Identi\256cation,)3 1375( 32-bit)1 290(Figure 1-7:)1 460 3 658 3516 t 9 CW f (e_ident)2837 3516 w 10 PA f (Position Value)1 1300 1 2412 3708 t 10 S f (_ ____________________________________)1 1830 1 2083 3728 t 10 CW f (e_ident[EI_CLASS] ELFCLASS32)1 1770 1 2083 3848 t (e_ident[EI_DATA] ELFDATA2LSB)1 1830 1 2083 3968 t 10 S f ( \347)1 -735(_ ____________________________________)1 1830 2 2083 4024 t (\347)3178 3928 w (\347)3178 3828 w 8 PA f 5338 4216 658 4216 Dl 10 PA f (Processor identi\256cation resides in the ELF header's)6 2253 1 658 4516 t 10 CW f (e_machine)2936 4516 w 10 PA f (member and must have the value)5 1478 1 3509 4516 t 10 CW f (EM_386)658 4636 w 10 PA f (.)1026 4636 w (The ELF header's)2 770 1 658 4816 t 10 CW f (e_flags)1453 4816 w 10 PA f ( 32-bit Intel Architecture)3 1082( The)1 217(member holds bit \257ags associated with the \256le.)7 2072 3 1906 4816 t (de\256nes no \257ags; so this member contains zero.)7 2053 1 658 4936 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-7)5218 7324 w cleartomark showpage restore %%EndPage: 7 13 %%Page: 8 14 save mark 14 pagesetup 16 HB f 5340 516 540 516 Dl (Sections)540 682 w 10 PA f ( section header table is an)5 1133( The)1 217(An object \256le's section header table lets one locate all the \256le's sections.)12 3134 3 540 1042 t (array of)1 349 1 540 1162 t 10 CW f (Elf32_Shdr)914 1162 w 10 PA f ( section header table index is a subscript into this)9 2165( A)1 128(structures as described below.)3 1332 3 1547 1162 t ( ELF header's)2 603(array. The)1 478 2 540 1282 t 10 CW f (e_shoff)1646 1282 w 10 PA f (member gives the byte offset from the beginning of the \256le to the sec-)13 3059 1 2099 1282 t (tion header table;)2 770 1 540 1402 t 10 CW f (e_shnum)1335 1402 w 10 PA f (tells how many entries the section header table contains;)8 2489 1 1788 1402 t 10 CW f (e_shentsize)4302 1402 w 10 PA f (gives the size in bytes of each entry.)7 1583 1 540 1522 t (Some section header table indexes are reserved; an object \256le will not have sections for these special)16 4399 1 540 1702 t (indexes.)540 1822 w 8 HB f 5220 1982 540 1982 Dl 9 HB f ( Section Indexes)2 710( Special)1 365(Figure 1-8:)1 460 3 540 2082 t 10 PA f (Name Value)1 984 1 2490 2274 t 10 S f (_ _________________________)1 1290 1 2235 2294 t 10 CW f (SHN_UNDEF 0)1 1290 1 2235 2414 t (SHN_LORESERVE 0xff00)1 1290 1 2235 2534 t (SHN_LOPROC 0xff00)1 1290 1 2235 2654 t (SHN_HIPROC 0xff1f)1 1290 1 2235 2774 t (SHN_ABS 0xfff1)1 1290 1 2235 2894 t (SHN_COMMON 0xfff2)1 1290 1 2235 3014 t (SHN_HIRESERVE 0xffff)1 1290 1 2235 3134 t 10 S f ( \347)1 -435(_ _________________________)1 1290 2 2235 3190 t (\347)3090 3094 w (\347)3090 2994 w (\347)3090 2894 w (\347)3090 2794 w (\347)3090 2694 w (\347)3090 2594 w (\347)3090 2494 w (\347)3090 2394 w 8 PA f 5220 3382 540 3382 Dl 10 CW f (SHN_UNDEF)540 3622 w 10 PA f (This value marks an unde\256ned, missing, irrelevant, or otherwise meaningless section)10 3760 1 1440 3622 t ( example, a symbol ``de\256ned'' relative to section number)8 2503(reference. For)1 633 2 1440 3742 t 10 CW f (SHN_UNDEF)4601 3742 w 10 PA f (is an unde\256ned symbol.)3 1059 1 1440 3862 t /oldm /m load def /m {} def gsave newpath 540 -4082 moveto 810 -4082 lineto 810 -4382 lineto 540 -4382 lineto closepath 0.999 setgray fill grestore /m /oldm load def 7 HB f 810 4082 540 4082 Dl 810 4382 810 4082 Dl 540 4382 810 4382 Dl 540 4082 540 4382 Dl 681 4502 681 4382 Dl (NOTE)582 4250 w 9 H f (Although index 0 is reserved as the unde\256ned value, the section header table contains an entry for)16 3915 1 900 4142 t ( is, if the)3 335( That)1 230(index 0.)1 315 3 900 4242 t 9 CW f (e_shnum)1805 4242 w 9 H f (member of the ELF header says a \256le has 6 entries in the section)13 2595 1 2215 4242 t ( contents of the initial entry are speci\256ed later in)9 1900( The)1 205(header table, they have the indexes 0 through 5.)8 1930 3 900 4342 t (this section.)1 475 1 900 4442 t 10 CW f (SHN_LORESERVE)540 4702 w 10 PA f (This value speci\256es the lower bound of the range of reserved indexes.)11 3078 1 1440 4702 t 10 CW f (SHN_LOPROC)540 4882 w 10 PA f (through)1165 4882 w 10 CW f (SHN_HIPROC)1550 4882 w 10 PA f (Values in this inclusive range are reserved for processor-speci\256c semantics.)9 3317 1 1440 5002 t 10 CW f (SHN_ABS)540 5182 w 10 PA f ( example,)1 425( For)1 201(This value speci\256es absolute values for the corresponding reference.)8 3009 3 1440 5182 t (symbols de\256ned relative to section number)5 1908 1 1440 5302 t 10 CW f (SHN_ABS)3373 5302 w 10 PA f (have absolute values and are)4 1276 1 3826 5302 t (not affected by relocation.)3 1148 1 1440 5422 t 10 CW f (SHN_COMMON)540 5602 w 10 PA f (Symbols de\256ned relative to this section are common symbols, such as FORTRAN)11 3587 1 1440 5602 t 10 CW f (COMMON)1440 5722 w 10 PA f (or unallocated C external variables.)4 1565 1 1833 5722 t 10 CW f (SHN_HIRESERVE)540 5902 w 10 PA f ( system)1 334( The)1 217(This value speci\256es the upper bound of the range of reserved indexes.)11 3091 3 1440 5902 t (reserves indexes between)2 1125 1 1440 6022 t 10 CW f (SHN_LORESERVE)2590 6022 w 10 PA f (and)3403 6022 w 10 CW f (SHN_HIRESERVE)3597 6022 w 10 PA f (, inclusive; the)2 634 1 4385 6022 t ( is, the section header table)5 1189( That)1 252(values do not reference the section header table.)7 2122 3 1440 6142 t (does)1440 6262 w 10 PI f (not)1671 6262 w 10 PA f (contain entries for the reserved indexes.)5 1763 1 1829 6262 t (Sections contain all information in an object \256le, except the ELF header, the program header table, and the)17 4679 1 540 6502 t ( object \256les' sections satisfy several conditions.)6 2054( Moreover,)1 512(section header table.)2 904 3 540 6622 t 9 R f (1-8)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 8 14 %%Page: 9 15 save mark 15 pagesetup 9 HB f 3841 540 658 540 Dl (ELF: Executable and Linkable Format)4 1605 1 3913 540 t 10 S f ()816 1020 w 816 1020 m 50 build_bx 866 1020 m 10 PA f ( headers may)2 591( Section)1 370(Every section in an object \256le has exactly one section header describing it.)12 3247 3 932 1020 t (exist that do not have a section.)6 1386 1 932 1140 t 10 S f ()816 1320 w 816 1320 m 50 build_bx 866 1320 m 10 PA f (Each section occupies one contiguous \(possibly empty\) sequence of bytes within a \256le.)12 3805 1 932 1320 t 10 S f ()816 1500 w 816 1500 m 50 build_bx 866 1500 m 10 PA f ( byte in a \256le resides in more than one section.)10 2039( No)1 188(Sections in a \256le may not overlap.)6 1490 3 932 1500 t 10 S f ()816 1680 w 816 1680 m 50 build_bx 866 1680 m 10 PA f ( various headers and the sections might not ``cover'')8 2303( The)1 217(An object \256le may have inactive space.)6 1704 3 932 1680 t ( contents of the inactive data are unspeci\256ed.)7 1988( The)1 217(every byte in an object \256le.)5 1181 3 932 1800 t (A section header has the following structure.)6 1983 1 658 1980 t 8 HB f 5338 2140 658 2140 Dl 9 HB f ( Header)1 330( Section)1 375(Figure 1-9:)1 460 3 658 2240 t /oldm /m load def /m {} def gsave 766 -2536 moveto 766 -3916 946 -3916 180 arcto 4 {pop} repeat 5266 -3916 5266 -3736 180 arcto 4 {pop} repeat 5266 -2356 5086 -2356 180 arcto 4 {pop} repeat 766 -2356 766 -2536 180 arcto 4 {pop} repeat 0.999 setgray fill grestore /m /oldm load def 8 CW f 766 3736 766 2536 Dl 766 3736 180 0 0 180 Da 5086 3916 946 3916 Dl 5086 3916 0 -180 180 0 Da 5266 2536 5266 3736 Dl 5266 2536 -180 0 0 -180 Da 946 2356 5086 2356 Dl 946 2356 0 180 -180 0 Da ( {)1 88( t r u c t)5 220( s)1 88(t y p e d e f)6 312 4 908 2636 t ( h _ n a m e ;)7 308( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 2736 t ( h _ t y p e ;)7 308( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 2836 t ( h _ f l a g s ;)8 352( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 2936 t ( h _ a d d r ;)7 308( s)1 324(E l f 3 2 _ A d d r)9 444 3 1268 3036 t ( h _ o f f s e t ;)9 396( s)1 368(E l f 3 2 _ O f f)8 400 3 1268 3136 t ( h _ s i z e ;)7 308( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 3236 t ( h _ l i n k ;)7 308( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 3336 t ( h _ i n f o ;)7 308( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 3436 t ( h _ a d d r a l i g n ;)12 528( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 3536 t ( h _ e n t s i z e ;)10 440( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 3636 t ( l f 3 2 _ S h d r ;)10 440(} E)1 136 2 908 3736 t 5338 4044 658 4044 Dl 10 CW f (sh_name)658 4284 w 10 PA f ( value is an index into the section)7 1468( Its)1 159(This member speci\256es the name of the section.)7 2050 3 1522 4284 t (header string table section [see ``String Table'' below], giving the location of a null-)13 3658 1 1522 4404 t (terminated string.)1 796 1 1522 4524 t 10 CW f (sh_type)658 4704 w 10 PA f ( types and their)3 691( Section)1 370(This member categorizes the section's contents and semantics.)7 2744 3 1522 4704 t (descriptions appear below.)2 1194 1 1522 4824 t 10 CW f (sh_flags)658 5004 w 10 PA f ( de\256nitions)1 499( Flag)1 241(Sections support 1-bit \257ags that describe miscellaneous attributes.)7 2907 3 1522 5004 t (appear below.)1 628 1 1522 5124 t 10 CW f (sh_addr)658 5304 w 10 PA f (If the section will appear in the memory image of a process, this member gives the)15 3633 1 1522 5304 t ( the member con-)3 771( Otherwise,)1 535(address at which the section's \256rst byte should reside.)8 2383 3 1522 5424 t (tains 0.)1 312 1 1522 5544 t 10 CW f (sh_offset)658 5724 w 10 PA f (This member's value gives the byte offset from the beginning of the \256le to the \256rst)15 3621 1 1522 5724 t ( section type,)2 581( One)1 235(byte in the section.)3 827 3 1522 5844 t 10 CW f (SHT_NOBITS)3190 5844 w 10 PA f (described below, occupies no)3 1293 1 3823 5844 t (space in the \256le, and its)5 1031 1 1522 5964 t 10 CW f (sh_offset)2578 5964 w 10 PA f (member locates the conceptual placement in the)6 2122 1 3151 5964 t (\256le.)1522 6084 w 10 CW f (sh_size)658 6264 w 10 PA f ( the section type is)4 816( Unless)1 347(This member gives the section's size in bytes.)7 1996 3 1522 6264 t 10 CW f (SHT_NOBITS)1522 6384 w 10 PA f (, the section occupies)3 930 1 2130 6384 t 10 CW f (sh_size)3085 6384 w 10 PA f ( section of type)3 669( A)1 128(bytes in the \256le.)3 698 3 3538 6384 t 10 CW f (SHT_NOBITS)1522 6504 w 10 PA f (may have a non-zero size, but it occupies no space in the \256le.)12 2685 1 2155 6504 t 10 CW f (sh_link)658 6684 w 10 PA f (This member holds a section header table index link, whose interpretation depends)11 3679 1 1522 6684 t ( table below describes the values.)5 1468( A)1 128(on the section type.)3 858 3 1522 6804 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-9)5218 7324 w cleartomark showpage restore %%EndPage: 9 15 %%Page: 10 16 save mark 16 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 10 CW f (sh_info)540 1020 w 10 PA f (This member holds extra information, whose interpretation depends on the section)10 3667 1 1404 1020 t ( table below describes the values.)5 1468(type. A)1 350 2 1404 1140 t 10 CW f (sh_addralign)540 1320 w 10 PA f ( example, if a section holds a)6 1266( For)1 201(Some sections have address alignment constraints.)5 2234 3 1404 1320 t (doubleword, the system must ensure doubleword alignment for the entire section.)10 3642 1 1404 1440 t (That is, the value of)4 868 1 1404 1560 t 10 CW f (sh_addr)2297 1560 w 10 PA f (must be congruent to 0, modulo the value of)8 1959 1 2750 1560 t 10 CW f (sh_addralign)1404 1680 w 10 PA f ( only 0 and positive integral powers of two are allowed.)10 2467(. Currently,)1 535 2 2132 1680 t (Values 0 and 1 mean the section has no alignment constraints.)10 2733 1 1404 1800 t 10 CW f (sh_entsize)540 1980 w 10 PA f ( such a sec-)3 496( For)1 201(Some sections hold a table of \256xed-size entries, such as a symbol table.)12 3109 3 1404 1980 t ( member contains 0 if the)5 1112( The)1 217(tion, this member gives the size in bytes of each entry.)10 2387 3 1404 2100 t (section does not hold a table of \256xed-size entries.)8 2164 1 1404 2220 t (A section header's)2 812 1 540 2460 t 10 CW f (sh_type)1377 2460 w 10 PA f (member speci\256es the section's semantics.)4 1818 1 1830 2460 t 8 HB f 5220 2620 540 2620 Dl 9 HB f ( Types,)1 310( Section)1 375(Figure 1-10:)1 510 3 540 2720 t 9 CW f (sh_type)1760 2720 w 10 PA f (Name Value)1 1074 1 2370 2912 t 10 S f (_ _____________________________)1 1470 1 2145 2932 t 10 CW f (SHT_NULL 0)1 1470 1 2145 3052 t (SHT_PROGBITS 1)1 1470 1 2145 3172 t (SHT_SYMTAB 2)1 1470 1 2145 3292 t (SHT_STRTAB 3)1 1470 1 2145 3412 t (SHT_RELA 4)1 1470 1 2145 3532 t (SHT_HASH 5)1 1470 1 2145 3652 t (SHT_DYNAMIC 6)1 1470 1 2145 3772 t (SHT_NOTE 7)1 1470 1 2145 3892 t (SHT_NOBITS 8)1 1470 1 2145 4012 t (SHT_REL 9)1 1470 1 2145 4132 t (SHT_SHLIB 10)1 1470 1 2145 4252 t (SHT_DYNSYM 11)1 1470 1 2145 4372 t (SHT_LOPROC 0x70000000)1 1470 1 2145 4492 t (SHT_HIPROC 0x7fffffff)1 1470 1 2145 4612 t (SHT_LOUSER 0x80000000)1 1470 1 2145 4732 t (SHT_HIUSER 0xffffffff)1 1470 1 2145 4852 t 10 S f ( \347)1 -675(_ _____________________________)1 1470 2 2145 4908 t (\347)2940 4832 w (\347)2940 4732 w (\347)2940 4632 w (\347)2940 4532 w (\347)2940 4432 w (\347)2940 4332 w (\347)2940 4232 w (\347)2940 4132 w (\347)2940 4032 w (\347)2940 3932 w (\347)2940 3832 w (\347)2940 3732 w (\347)2940 3632 w (\347)2940 3532 w (\347)2940 3432 w (\347)2940 3332 w (\347)2940 3232 w (\347)2940 3132 w (\347)2940 3032 w 8 PA f 5220 5100 540 5100 Dl 10 CW f (SHT_NULL)540 5400 w 10 PA f (This value marks the section header as inactive; it does not have an associated section.)14 3798 1 1390 5400 t (Other members of the section header have unde\256ned values.)8 2685 1 1390 5520 t 10 CW f (SHT_PROGBITS)540 5700 w 10 PA f (The section holds information de\256ned by the program, whose format and meaning are)12 3829 1 1390 5700 t (determined solely by the program.)4 1537 1 1390 5820 t 10 CW f (SHT_SYMTAB)540 6000 w 10 PA f (and)1165 6000 w 10 CW f (SHT_DYNSYM)1359 6000 w 10 PA f ( an object \256le may have only one sec-)8 1636( Currently,)1 510(These sections hold a symbol table.)5 1551 3 1390 6120 t ( Typically,)1 489(tion of each type, but this restriction may be relaxed in the future.)12 2896 2 1390 6240 t 10 CW f (SHT_SYMTAB)1390 6360 w 10 PA f (provides symbols for link editing, though it may also be used for)11 2866 1 2023 6360 t ( a complete symbol table, it may contain many symbols unneces-)10 2863( As)1 170(dynamic linking.)1 751 3 1390 6480 t ( an object \256le may also contain a)7 1426( Consequently,)1 689(sary for dynamic linking.)3 1117 3 1390 6600 t 10 CW f (SHT_DYNSYM)1390 6720 w 10 PA f (section, which holds a minimal set of dynamic linking symbols, to save)11 3135 1 2023 6720 t ( ``Symbol Table'' below for details.)5 1531(space. See)1 468 2 1390 6840 t 9 R f (1-10)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 10 16 %%Page: 11 17 save mark 17 pagesetup 9 HB f 3841 540 658 540 Dl (ELF: Executable and Linkable Format)4 1605 1 3913 540 t 10 CW f (SHT_STRTAB)658 1020 w 10 PA f ( object \256le may have multiple string table sections.)8 2227( An)1 186(The section holds a string table.)5 1394 3 1508 1020 t (See ``String Table'' below for details.)5 1613 1 1508 1140 t 10 CW f (SHT_RELA)658 1320 w 10 PA f (The section holds relocation entries with explicit addends, such as type)10 3136 1 1508 1320 t 10 CW f (Elf32_Rela)4669 1320 w 10 PA f ( object \256le may have multiple relocation sections.)7 2170( An)1 186(for the 32-bit class of object \256les.)6 1425 3 1508 1440 t (See ``Relocation'' below for details.)4 1544 1 1508 1560 t 10 CW f (SHT_HASH)658 1740 w 10 PA f ( objects participating in dynamic linking)5 1784( All)1 186(The section holds a symbol hash table.)6 1694 3 1508 1740 t ( an object \256le may have only one hash)8 1677( Currently,)1 510(must contain a symbol hash table.)5 1498 3 1508 1860 t ( ``Hash Table'' in Part 2 for)6 1186( See)1 199(table, but this restriction may be relaxed in the future.)9 2376 3 1508 1980 t (details.)1508 2100 w 10 CW f (SHT_DYNAMIC)658 2280 w 10 PA f ( an object \256le may have)5 1035( Currently,)1 510(The section holds information for dynamic linking.)6 2253 3 1508 2280 t ( See)1 199(only one dynamic section, but this restriction may be relaxed in the future.)12 3290 2 1508 2400 t (``Dynamic Section'' in Part 2 for details.)6 1749 1 1508 2520 t 10 CW f (SHT_NOTE)658 2700 w 10 PA f ( ``Note Section'' in)3 813( See)1 199(The section holds information that marks the \256le in some way.)10 2760 3 1508 2700 t (Part 2 for details.)3 753 1 1508 2820 t 10 CW f (SHT_NOBITS)658 3000 w 10 PA f (A section of this type occupies no space in the \256le but otherwise resembles)13 3286 1 1508 3000 t 10 CW f (SHT_PROGBITS)1508 3120 w 10 PA f ( this section contains no bytes, the)6 1501(. Although)1 502 2 2236 3120 t 10 CW f (sh_offset)4264 3120 w 10 PA f (member)4837 3120 w (contains the conceptual \256le offset.)4 1496 1 1508 3240 t 10 CW f (SHT_REL)658 3420 w 10 PA f (The section holds relocation entries without explicit addends, such as type)10 3284 1 1508 3420 t 10 CW f (Elf32_Rel)1508 3540 w 10 PA f ( object \256le may have multiple reloca-)6 1627( An)1 186(for the 32-bit class of object \256les.)6 1425 3 2081 3540 t ( ``Relocation'' below for details.)4 1395( See)1 199(tion sections.)1 576 3 1508 3660 t 10 CW f (SHT_SHLIB)658 3840 w 10 PA f ( that contain a)3 626( Programs)1 481(This section type is reserved but has unspeci\256ed semantics.)8 2618 3 1508 3840 t (section of this type do not conform to the ABI.)9 2041 1 1508 3960 t 10 CW f (SHT_LOPROC)658 4140 w 10 PA f (through)1283 4140 w 10 CW f (SHT_HIPROC)1668 4140 w 10 PA f (Values in this inclusive range are reserved for processor-speci\256c semantics.)9 3317 1 1508 4260 t 10 CW f (SHT_LOUSER)658 4440 w 10 PA f (This value speci\256es the lower bound of the range of indexes reserved for application)13 3728 1 1508 4440 t (programs.)1508 4560 w 10 CW f (SHT_HIUSER)658 4740 w 10 PA f (This value speci\256es the upper bound of the range of indexes reserved for application)13 3741 1 1508 4740 t ( types between)2 662(programs. Section)1 826 2 1508 4860 t 10 CW f (SHT_LOUSER)3021 4860 w 10 PA f (and)3654 4860 w 10 CW f (SHT_HIUSER)3848 4860 w 10 PA f (may be used by)3 694 1 4481 4860 t (the application, without con\257icting with current or future system-de\256ned section)9 3587 1 1508 4980 t (types.)1508 5100 w ( mentioned before, the section header for index 0)8 2161( As)1 170(Other section type values are reserved.)5 1720 3 658 5340 t (\()658 5460 w 10 CW f (SHN_UNDEF)691 5460 w 10 PA f ( entry holds the fol-)4 869( This)1 240(\) exists, even though the index marks unde\256ned section references.)9 2960 3 1231 5460 t (lowing.)658 5580 w 8 HB f 5338 5740 658 5740 Dl 9 HB f ( Header Table Entry: Index 0)5 1210( Section)1 375(Figure 1-11:)1 510 3 658 5840 t 10 PA f ( Note)1 956(Name Value)1 1044 2 1887 6032 t 10 S f (_ _____________________________________________________)1 2671 1 1662 6052 t 10 CW f (sh_name 0)1 1170 1 1662 6172 t 10 PA f (No name)1 407 1 3222 6172 t 10 CW f (sh_type SHT_NULL)1 1380 1 1662 6292 t 10 PA f (Inactive)3222 6292 w 10 CW f (sh_flags 0)1 1170 1 1662 6412 t 10 PA f (No \257ags)1 372 1 3222 6412 t 10 CW f (sh_addr 0)1 1170 1 1662 6532 t 10 PA f (No address)1 507 1 3222 6532 t 10 CW f (sh_offset 0)1 1170 1 1662 6652 t 10 PA f (No \256le offset)2 570 1 3222 6652 t 10 CW f (sh_size 0)1 1170 1 1662 6772 t 10 PA f (No size)1 332 1 3222 6772 t 10 S f (\347)2457 6772 w (\347)2457 6752 w (\347)2457 6652 w (\347)2457 6552 w (\347)2457 6452 w (\347)2457 6352 w (\347)2457 6252 w (\347)2457 6152 w (\347)3147 6772 w (\347)3147 6752 w (\347)3147 6652 w (\347)3147 6552 w (\347)3147 6452 w (\347)3147 6352 w (\347)3147 6252 w (\347)3147 6152 w 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-11)5173 7324 w cleartomark showpage restore %%EndPage: 11 17 %%Page: 12 18 save mark 18 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 8 HB f 5220 1000 540 1000 Dl 9 HB f ( Header Table Entry: Index 0)5 1210( Section)1 375(Figure 1-11:)1 510 3 540 1100 t 9 H f (\(continued \))1 465 1 2685 1100 t 10 CW f (sh_link SHN_UNDEF)1 1410 1 1544 1292 t 10 PA f (No link information)2 888 1 3104 1292 t 10 CW f (sh_info 0)1 1170 1 1544 1412 t 10 PA f (No auxiliary information)2 1111 1 3104 1412 t 10 CW f (sh_addralign 0)1 1170 1 1544 1532 t 10 PA f (No alignment)1 612 1 3104 1532 t 10 CW f (sh_entsize 0)1 1170 1 1544 1652 t 10 PA f (No entries)1 461 1 3104 1652 t 10 S f ( \347)1 -1876(_ _____________________________________________________)1 2671 2 1544 1708 t (\347)2339 1692 w (\347)2339 1592 w (\347)2339 1492 w (\347)2339 1392 w (\347)2339 1292 w (\347)3029 1708 w (\347)3029 1692 w (\347)3029 1592 w (\347)3029 1492 w (\347)3029 1392 w (\347)3029 1292 w 8 PA f 5220 1900 540 1900 Dl 10 PA f (A section header's)2 812 1 540 2140 t 10 CW f (sh_flags)1377 2140 w 10 PA f ( De\256ned)1 403(member holds 1-bit \257ags that describe the section's attributes.)8 2728 2 1890 2140 t (values appear below; other values are reserved.)6 2103 1 540 2260 t 8 HB f 5220 2420 540 2420 Dl 9 HB f ( Attribute Flags,)2 685( Section)1 375(Figure 1-12:)1 510 3 540 2520 t 9 CW f (sh_flags)2135 2520 w 10 PA f (Name Value)1 1104 1 2370 2712 t 10 S f (_ ______________________________)1 1530 1 2115 2732 t 10 CW f (SHF_WRITE 0x1)1 1530 1 2115 2852 t (SHF_ALLOC 0x2)1 1530 1 2115 2972 t (SHF_EXECINSTR 0x4)1 1530 1 2115 3092 t (SHF_MASKPROC 0xf0000000)1 1530 1 2115 3212 t 10 S f ( \347)1 -675(_ ______________________________)1 1530 2 2115 3268 t (\347)2970 3232 w (\347)2970 3132 w (\347)2970 3032 w (\347)2970 2932 w (\347)2970 2832 w 8 PA f 5220 3460 540 3460 Dl 10 PA f (If a \257ag bit is set in)6 832 1 540 3640 t 10 CW f (sh_flags)1397 3640 w 10 PA f ( the attribute is ``off'' or)5 1044( Otherwise,)1 535(, the attribute is ``on'' for the section.)7 1617 3 1885 3640 t ( attributes are set to zero.)5 1115( Unde\256ned)1 523(does not apply.)2 682 3 540 3760 t 10 CW f (SHF_WRITE)540 3940 w 10 PA f (The section contains data that should be writable during process execution.)10 3325 1 1440 3940 t 10 CW f (SHF_ALLOC)540 4120 w 10 PA f ( control sections do)3 856( Some)1 294(The section occupies memory during process execution.)6 2470 3 1440 4120 t (not reside in the memory image of an object \256le; this attribute is off for those sections.)16 3778 1 1440 4240 t 10 CW f (SHF_EXECINSTR)540 4420 w 10 PA f (The section contains executable machine instructions.)5 2360 1 1440 4420 t 10 CW f (SHF_MASKPROC)540 4600 w 10 PA f (All bits included in this mask are reserved for processor-speci\256c semantics.)10 3315 1 1440 4600 t (Two members in the section header,)5 1598 1 540 4840 t 10 CW f (sh_link)2163 4840 w 10 PA f (and)2616 4840 w 10 CW f (sh_info)2810 4840 w 10 PA f (, hold special information, depending on)5 1800 1 3238 4840 t (section type.)1 556 1 540 4960 t 9 R f (1-12)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 12 18 %%Page: 13 19 save mark 19 pagesetup 9 HB f 3841 540 658 540 Dl (ELF: Executable and Linkable Format)4 1605 1 3913 540 t 8 HB f 5338 1000 658 1000 Dl 9 HB f (Figure 1-13:)1 510 1 658 1100 t 9 CW f (sh_link)1218 1100 w 9 HB f (and)1621 1100 w 9 CW f (sh_info)1835 1100 w 9 HB f (Interpretation)2238 1100 w 10 CW f ( sh_info)1 1410(sh_type sh_link)1 1530 2 1378 1292 t 10 S f (_ _____________________________________________________________________)1 3480 1 1258 1348 t 10 PA f (The section header index of)4 1217 1 2068 1468 t (the string table used by)4 1034 1 2068 1588 t (entries in the section.)3 933 1 2068 1708 t 10 CW f (SHT_DYNAMIC 0)1 2280 1 1258 1468 t 10 S f (_ _____________________________________________________________________)1 3480 1 1258 1748 t 10 PA f (The section header index of)4 1217 1 2068 1868 t (the symbol table to which)4 1139 1 2068 1988 t (the hash table applies.)3 980 1 2068 2108 t 10 CW f (SHT_HASH 0)1 2280 1 1258 1868 t 10 S f (_ _____________________________________________________________________)1 3480 1 1258 2148 t 10 CW f (SHT_REL)1258 2268 w (SHT_RELA)1258 2388 w 10 PA f (The section header index of)4 1217 1 2068 2268 t (the associated symbol table.)3 1233 1 2068 2388 t (The section header index of)4 1217 1 3478 2268 t (the section to which the)4 1047 1 3478 2388 t (relocation applies.)1 809 1 3478 2508 t 10 S f (_ _____________________________________________________________________)1 3480 1 1258 2548 t 10 CW f (SHT_SYMTAB)1258 2668 w (SHT_DYNSYM)1258 2788 w 10 PA f (The section header index of)4 1217 1 2068 2668 t (the associated string table.)3 1166 1 2068 2788 t (One greater than the sym-)4 1157 1 3478 2668 t (bol table index of the last)5 1108 1 3478 2788 t (local symbol \(binding)2 961 1 3478 2908 t 10 CW f (STB_LOCAL)3478 3028 w 10 PA f (\).)4026 3028 w 10 S f (_ _____________________________________________________________________)1 3480 1 1258 3068 t 10 PA f (other)1258 3188 w 10 CW f (SHN_UNDEF 0)1 1470 1 2068 3188 t 10 S f ( \347)1 -2745(_ _____________________________________________________________________)1 3480 2 1258 3244 t (\347)1993 3148 w (\347)1993 3048 w (\347)1993 2948 w (\347)1993 2848 w (\347)1993 2748 w (\347)1993 2648 w (\347)1993 2548 w (\347)1993 2448 w (\347)1993 2348 w (\347)1993 2248 w (\347)1993 2148 w (\347)1993 2048 w (\347)1993 1948 w (\347)1993 1848 w (\347)1993 1748 w (\347)1993 1648 w (\347)1993 1548 w (\347)1993 1448 w (\347)3403 3244 w (\347)3403 3148 w (\347)3403 3048 w (\347)3403 2948 w (\347)3403 2848 w (\347)3403 2748 w (\347)3403 2648 w (\347)3403 2548 w (\347)3403 2448 w (\347)3403 2348 w (\347)3403 2248 w (\347)3403 2148 w (\347)3403 2048 w (\347)3403 1948 w (\347)3403 1848 w (\347)3403 1748 w (\347)3403 1648 w (\347)3403 1548 w (\347)3403 1448 w 8 PA f 5338 3436 658 3436 Dl 14 HB f (Special Sections)1 1113 1 658 3876 t 10 PA f ( in the list below are used by the system)9 1762( Sections)1 412(Various sections hold program and control information.)6 2477 3 658 4116 t (and have the indicated types and attributes.)6 1939 1 658 4236 t 8 HB f 5338 4396 658 4396 Dl 9 HB f ( Sections)1 400( Special)1 365(Figure 1-14:)1 510 3 658 4496 t 10 PA f ( Attributes)1 1329(Name Type)1 1027 2 1647 4688 t 10 S f (_ ___________________________________________________________)1 2972 1 1512 4708 t 10 CW f ( + SHF_WRITE)2 632( SHF_ALLOC)1 810(.bss SHT_NOBITS)1 1290 3 1512 4828 t (.comment SHT_PROGBITS)1 1410 1 1512 4948 t 10 PA f (none)3072 4948 w 10 CW f ( + SHF_WRITE)2 632( SHF_ALLOC)1 690(.data SHT_PROGBITS)1 1410 3 1512 5068 t ( + SHF_WRITE)2 632( SHF_ALLOC)1 690(.data1 SHT_PROGBITS)1 1410 3 1512 5188 t (.debug SHT_PROGBITS)1 1410 1 1512 5308 t 10 PA f (none)3072 5308 w 10 CW f (.dynamic SHT_DYNAMIC)1 1350 1 1512 5428 t 10 PA f (see below)1 433 1 3072 5428 t 10 CW f (.dynstr SHT_STRTAB SHF_ALLOC)2 2100 1 1512 5548 t (.dynsym SHT_DYNSYM SHF_ALLOC)2 2100 1 1512 5668 t ( + SHF_EXECINSTR)2 872( SHF_ALLOC)1 690(.fini SHT_PROGBITS)1 1410 3 1512 5788 t (.got SHT_PROGBITS)1 1410 1 1512 5908 t 10 PA f (see below)1 433 1 3072 5908 t 10 CW f (.hash SHT_HASH SHF_ALLOC)2 2100 1 1512 6028 t ( + SHF_EXECINSTR)2 872( SHF_ALLOC)1 690(.init SHT_PROGBITS)1 1410 3 1512 6148 t (.interp SHT_PROGBITS)1 1410 1 1512 6268 t 10 PA f (see below)1 433 1 3072 6268 t 10 CW f (.line SHT_PROGBITS)1 1410 1 1512 6388 t 10 PA f (none)3072 6388 w 10 CW f (.note SHT_NOTE)1 1170 1 1512 6508 t 10 PA f (none)3072 6508 w 10 CW f (.plt SHT_PROGBITS)1 1410 1 1512 6628 t 10 PA f (see below)1 433 1 3072 6628 t 10 CW f (.rel)1512 6748 w 10 PI f (name)1752 6748 w 10 CW f (SHT_REL)2202 6748 w 10 PA f (see below)1 433 1 3072 6748 t 10 S f (\347)2127 6748 w (\347)2127 6708 w (\347)2127 6608 w (\347)2127 6508 w (\347)2127 6408 w (\347)2127 6308 w (\347)2127 6208 w (\347)2127 6108 w (\347)2127 6008 w (\347)2127 5908 w (\347)2127 5808 w (\347)2127 5708 w (\347)2127 5608 w (\347)2127 5508 w (\347)2127 5408 w (\347)2127 5308 w (\347)2127 5208 w (\347)2127 5108 w (\347)2127 5008 w (\347)2127 4908 w (\347)2127 4808 w (\347)2997 6748 w (\347)2997 6708 w (\347)2997 6608 w (\347)2997 6508 w (\347)2997 6408 w (\347)2997 6308 w (\347)2997 6208 w (\347)2997 6108 w (\347)2997 6008 w (\347)2997 5908 w (\347)2997 5808 w (\347)2997 5708 w (\347)2997 5608 w (\347)2997 5508 w (\347)2997 5408 w (\347)2997 5308 w (\347)2997 5208 w (\347)2997 5108 w (\347)2997 5008 w (\347)2997 4908 w (\347)2997 4808 w 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-13)5173 7324 w cleartomark showpage restore %%EndPage: 13 19 %%Page: 14 20 save mark 20 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 8 HB f 5220 1000 540 1000 Dl 9 HB f ( Sections)1 400( Special)1 365(Figure 1-14:)1 510 3 540 1100 t 9 H f (\(continued \))1 465 1 1865 1100 t 10 CW f (.rela)1394 1292 w 10 PI f (name)1694 1292 w 10 CW f (SHT_RELA)2084 1292 w 10 PA f (see below)1 433 1 2954 1292 t 10 CW f ( SHF_ALLOC)1 690(.rodata SHT_PROGBITS)1 1410 2 1394 1412 t ( SHF_ALLOC)1 690(.rodata1 SHT_PROGBITS)1 1410 2 1394 1532 t (.shstrtab SHT_STRTAB)1 1290 1 1394 1652 t 10 PA f (none)2954 1652 w 10 CW f (.strtab SHT_STRTAB)1 1290 1 1394 1772 t 10 PA f (see below)1 433 1 2954 1772 t 10 CW f (.symtab SHT_SYMTAB)1 1290 1 1394 1892 t 10 PA f (see below)1 433 1 2954 1892 t 10 CW f ( + SHF_EXECINSTR)2 872( SHF_ALLOC)1 690(.text SHT_PROGBITS)1 1410 3 1394 2012 t 10 S f ( \347)1 -2357(_ ___________________________________________________________)1 2972 2 1394 2068 t (\347)2009 1992 w (\347)2009 1892 w (\347)2009 1792 w (\347)2009 1692 w (\347)2009 1592 w (\347)2009 1492 w (\347)2009 1392 w (\347)2009 1292 w (\347)2879 2068 w (\347)2879 1992 w (\347)2879 1892 w (\347)2879 1792 w (\347)2879 1692 w (\347)2879 1592 w (\347)2879 1492 w (\347)2879 1392 w (\347)2879 1292 w 8 PA f 5220 2260 540 2260 Dl 10 CW f (.bss)540 2500 w 10 PA f ( By)1 167(This section holds uninitialized data that contribute to the program's memory image.)11 3762 2 1190 2500 t ( The)1 217(de\256nition, the system initializes the data with zeros when the program begins to run.)13 3761 2 1190 2620 t (section occupies no \256le space, as indicated by the section type,)10 2747 1 1190 2740 t 10 CW f (SHT_NOBITS)3962 2740 w 10 PA f (.)4570 2740 w 10 CW f (.comment)540 2920 w 10 PA f (This section holds version control information.)5 2064 1 1190 2920 t 10 CW f (.data)540 3100 w 10 PA f (and)865 3100 w 10 CW f (.data1)1059 3100 w 10 PA f (These sections hold initialized data that contribute to the program's memory image.)11 3711 1 1190 3220 t 10 CW f (.debug)540 3400 w 10 PA f ( contents are unspeci\256ed.)3 1120( The)1 217(This section holds information for symbolic debugging.)6 2452 3 1190 3400 t 10 CW f (.dynamic)540 3580 w 10 PA f ( section's attributes will include the)5 1565( The)1 217(This section holds dynamic linking information.)5 2123 3 1190 3580 t 10 CW f (SHF_ALLOC)1190 3700 w 10 PA f ( the)1 164(bit. Whether)1 577 2 1755 3700 t 10 CW f (SHF_WRITE)2521 3700 w 10 PA f ( Part 2 for)3 436( See)1 199(bit is set is processor speci\256c.)5 1286 3 3086 3700 t (more information.)1 809 1 1190 3820 t 10 CW f (.dynstr)540 4000 w 10 PA f (This section holds strings needed for dynamic linking, most commonly the strings that)12 3826 1 1190 4000 t ( Part 2 for more information.)5 1270( See)1 199(represent the names associated with symbol table entries.)7 2537 3 1190 4120 t 10 CW f (.dynsym)540 4300 w 10 PA f ( See)1 199(This section holds the dynamic linking symbol table, as ``Symbol Table'' describes.)11 3641 2 1190 4300 t (Part 2 for more information.)4 1245 1 1190 4420 t 10 CW f (.fini)540 4600 w 10 PA f (This section holds executable instructions that contribute to the process termination code.)11 3950 1 1190 4600 t (That is, when a program exits normally, the system arranges to execute the code in this)15 3842 1 1190 4720 t (section.)1190 4840 w 10 CW f (.got)540 5020 w 10 PA f ( ``Special Sections'' in Part 1 and ``Global)7 1801( See)1 199(This section holds the global offset table.)6 1791 3 1190 5020 t (Offset Table'' in Part 2 for more information.)7 1974 1 1190 5140 t 10 CW f (.hash)540 5320 w 10 PA f ( ``Hash Table'' in Part 2 for more information.)8 2020( See)1 199(This section holds a symbol hash table.)6 1717 3 1190 5320 t 10 CW f (.init)540 5500 w 10 PA f (This section holds executable instructions that contribute to the process initialization code.)11 3990 1 1190 5500 t (That is, when a program starts to run, the system arranges to execute the code in this sec-)17 3936 1 1190 5620 t (tion before calling the main program entry point \(called)8 2466 1 1190 5740 t 10 CW f (main)3681 5740 w 10 PA f (for C programs\).)2 738 1 3954 5740 t 10 CW f (.interp)540 5920 w 10 PA f ( the \256le has a loadable seg-)6 1183( If)1 117(This section holds the path name of a program interpreter.)9 2582 3 1190 5920 t (ment that includes the section, the section's attributes will include the)10 3074 1 1190 6040 t 10 CW f (SHF_ALLOC)4289 6040 w 10 PA f (bit; oth-)1 346 1 4862 6040 t ( Part 2 for more information.)5 1270( See)1 199(erwise, that bit will be off.)5 1150 3 1190 6160 t 10 CW f (.line)540 6340 w 10 PA f (This section holds line number information for symbolic debugging, which describes the)11 3910 1 1190 6340 t ( contents are)2 559( The)1 217(correspondence between the source program and the machine code.)8 3007 3 1190 6460 t (unspeci\256ed.)1190 6580 w 9 R f (1-14)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 14 20 %%Page: 15 21 save mark 21 pagesetup 9 HB f 3841 540 658 540 Dl (ELF: Executable and Linkable Format)4 1605 1 3913 540 t 10 CW f (.note)658 1020 w 10 PA f (This section holds information in the format that ``Note Section'' in Part 2 describes.)13 3701 1 1308 1020 t 10 CW f (.plt)658 1200 w 10 PA f ( ``Special Sections'' in Part 1 and ``Pro-)7 1695( See)1 199(This section holds the procedure linkage table.)6 2055 3 1308 1200 t (cedure Linkage Table'' in Part 2 for more information.)8 2390 1 1308 1320 t 10 CW f (.rel)658 1500 w 10 PI f (name)898 1500 w 10 PA f (and)1140 1500 w 10 CW f (.rela)1334 1500 w 10 PI f (name)1634 1500 w 10 PA f ( the \256le has)3 502( If)1 117(These sections hold relocation information, as ``Relocation'' below describes.)8 3381 3 1308 1620 t (a loadable segment that includes relocation, the sections' attributes will include the)11 3665 1 1308 1740 t 10 CW f (SHF_ALLOC)1308 1860 w 10 PA f ( Conventionally,)1 760(bit; otherwise, that bit will be off.)6 1463 2 1881 1860 t 10 PI f (name)4129 1860 w 10 PA f (is supplied by the)3 785 1 4371 1860 t ( a relocation section for)4 1028( Thus)1 271(section to which the relocations apply.)5 1696 3 1308 1980 t 10 CW f (.text)4328 1980 w 10 PA f (normally)4661 1980 w (would have the name)3 958 1 1308 2100 t 10 CW f (.rel.text)2291 2100 w 10 PA f (or)2864 2100 w 10 CW f (.rela.text)2984 2100 w 10 PA f (.)3592 2100 w 10 CW f (.rodata)658 2280 w 10 PA f (and)1103 2280 w 10 CW f (.rodata1)1297 2280 w 10 PA f (These sections hold read-only data that typically contribute to a non-writable segment in)12 3919 1 1308 2400 t ( ``Program Header'' in Part 2 for more information.)8 2263( See)1 199(the process image.)2 816 3 1308 2520 t 10 CW f (.shstrtab)658 2700 w 10 PA f (This section holds section names.)4 1464 1 1308 2700 t 10 CW f (.strtab)658 2880 w 10 PA f (This section holds strings, most commonly the strings that represent the names associated)12 3969 1 1308 2880 t ( the \256le has a loadable segment that includes the symbol string)11 2769( If)1 117(with symbol table entries.)3 1141 3 1308 3000 t (table, the section's attributes will include the)6 1969 1 1308 3120 t 10 CW f (SHF_ALLOC)3302 3120 w 10 PA f (bit; otherwise, that bit will be off.)6 1463 1 3875 3120 t 10 CW f (.symtab)658 3300 w 10 PA f ( the \256le)2 327( If)1 117(This section holds a symbol table, as ``Symbol Table'' in this section describes.)12 3434 3 1308 3300 t (has a loadable segment that includes the symbol table, the section's attributes will include)13 3964 1 1308 3420 t (the)1308 3540 w 10 CW f (SHF_ALLOC)1472 3540 w 10 PA f (bit; otherwise, that bit will be off.)6 1463 1 2045 3540 t 10 CW f (.text)658 3720 w 10 PA f (This section holds the ``text,'' or executable instructions, of a program.)10 3098 1 1308 3720 t (Section names with a dot \()5 1166 1 658 3960 t 10 CW f (.)1824 3960 w 10 PA f (\) pre\256x are reserved for the system, although applications may use these sec-)12 3394 1 1884 3960 t ( may use names without the pre\256x to avoid)8 1920( Applications)1 617(tions if their existing meanings are satisfactory.)6 2083 3 658 4080 t ( An)1 186( object \256le format lets one de\256ne sections not in the list above.)12 2729( The)1 217(con\257icts with system sections.)3 1329 4 658 4200 t (object \256le may have more than one section with the same name.)11 2816 1 658 4320 t (Section names reserved for a processor architecture are formed by placing an abbreviation of the architec-)15 4667 1 658 4500 t ( name should be taken from the architecture names used for)10 2654( The)1 217(ture name ahead of the section name.)6 1647 3 658 4620 t 10 CW f (e_machine)658 4740 w 10 PA f ( Existing)1 410( instance .FOO.psect is the psect section de\256ned by the FOO architecture.)11 3227(. For)1 226 3 1198 4740 t (extensions are called by their historical names.)6 2053 1 658 4860 t (Pre-existing Extensions)1 1031 1 2482 5040 t 10 S f (_ _______________________)1 1170 1 2413 5060 t 10 CW f (.sdata .tdesc)1 1050 1 2413 5240 t (.sbss .lit4)1 990 1 2413 5360 t (.lit8 .reginfo)1 1170 1 2413 5480 t (.gptab .liblist)1 1170 1 2413 5600 t (.conflict)2413 5720 w 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-15)5173 7324 w cleartomark showpage restore %%EndPage: 15 21 %%Page: 16 22 save mark 22 pagesetup 16 HB f 5340 516 540 516 Dl (String Table)1 929 1 540 682 t 10 PA f ( object \256le)2 446( The)1 217(String table sections hold null-terminated character sequences, commonly called strings.)9 3897 3 540 1042 t ( references a string as an index into the)8 1719( One)1 235(uses these strings to represent symbol and section names.)8 2540 3 540 1162 t ( a)1 75( Likewise,)1 471( \256rst byte, which is index zero, is de\256ned to hold a null character.)13 2884( The)1 217(string table section.)2 857 5 540 1282 t ( A)1 128(string table's last byte is de\256ned to hold a null character, ensuring null termination for all strings.)16 4295 2 540 1402 t ( empty)1 310( An)1 186(string whose index is zero speci\256es either no name or a null name, depending on the context.)16 4112 3 540 1522 t (string table section is permitted; its section header's)7 2281 1 540 1642 t 10 CW f (sh_size)2846 1642 w 10 PA f ( Non-zero)1 472(member would contain zero.)3 1275 2 3299 1642 t (indexes are invalid for an empty string table.)7 1982 1 540 1762 t (A section header's)2 812 1 540 1942 t 10 CW f (sh_name)1377 1942 w 10 PA f (member holds an index into the section header string table section, as desig-)12 3364 1 1830 1942 t (nated by the)2 550 1 540 2062 t 10 CW f (e_shstrndx)1115 2062 w 10 PA f ( following \256gures show a string table with 25)8 1998( The)1 217(member of the ELF header.)4 1202 3 1748 2062 t (bytes and the strings associated with various indexes.)7 2369 1 540 2182 t ( 9)1 58( +)1 212( 8)1 58( +)1 212( 7)1 58( +)1 212( 6)1 58( +)1 212( 5)1 58( +)1 212( 4)1 58( +)1 212( 3)1 58( +)1 212( 2)1 58( +)1 212( 1)1 58( +)1 212( 0)1 58(Index +)1 464 20 1366 2362 t 10 S f (______________________________________________________)1694 2382 w 10 PA f (0)1492 2502 w 10 CW f ( a r)2 540( \\0 V)2 540( a m e .)4 1080(\\0 n)1 360 4 1769 2502 t 10 S f (______________________________________________________)1694 2522 w 10 PA f (10)1442 2642 w 10 CW f ( b l e)3 810( \\0 a)2 540(i a b l e)4 1140 3 1799 2642 t 10 S f (______________________________________________________)1694 2662 w 10 PA f (20)1442 2782 w 10 CW f ( \\0)1 300( x)1 270( x)1 240(\\0 \\0)1 390 4 1769 2782 t 10 S f (______________________________________________________ \347)1 0 1 1694 2802 t (\347)1694 2782 w (\347)1694 2682 w (\347)1694 2582 w (\347)1694 2482 w (\347)1964 2802 w (\347)1964 2782 w (\347)1964 2682 w (\347)1964 2582 w (\347)1964 2482 w (\347)2234 2802 w (\347)2234 2782 w (\347)2234 2682 w (\347)2234 2582 w (\347)2234 2482 w (\347)2504 2802 w (\347)2504 2782 w (\347)2504 2682 w (\347)2504 2582 w (\347)2504 2482 w (\347)2774 2802 w (\347)2774 2782 w (\347)2774 2682 w (\347)2774 2582 w (\347)2774 2482 w (\347)3044 2802 w (\347)3044 2782 w (\347)3044 2682 w (\347)3044 2582 w (\347)3044 2482 w (\347)3314 2802 w (\347)3314 2782 w (\347)3314 2682 w (\347)3314 2582 w (\347)3314 2482 w (\347)3584 2802 w (\347)3584 2782 w (\347)3584 2682 w (\347)3584 2582 w (\347)3584 2482 w (\347)3854 2802 w (\347)3854 2782 w (\347)3854 2682 w (\347)3854 2582 w (\347)3854 2482 w (\347)4124 2802 w (\347)4124 2782 w (\347)4124 2682 w (\347)4124 2582 w (\347)4124 2482 w (\347)4394 2802 w (\347)4394 2782 w (\347)4394 2682 w (\347)4394 2582 w (\347)4394 2482 w 8 HB f 5220 3022 540 3022 Dl 9 HB f ( Table Indexes)2 620( String)1 310(Figure 1-15:)1 510 3 540 3122 t 10 PA f (Index String)1 777 1 2438 3314 t 10 S f (_ _________________)1 883 1 2438 3334 t 10 PA f (0)2564 3454 w 10 PI f (none)2841 3454 w 10 PA f (1)2564 3574 w 10 CW f (name.)2841 3574 w 10 PA f (7)2564 3694 w 10 CW f (Variable)2841 3694 w 10 PA f (11)2514 3814 w 10 CW f (able)2841 3814 w 10 PA f (16)2514 3934 w 10 CW f (able)2841 3934 w 10 PA f (24)2514 4054 w 10 PI f (null string)1 438 1 2841 4054 t 10 S f ( \347)1 -555(_ _________________)1 883 2 2438 4074 t (\347)2766 4034 w (\347)2766 3934 w (\347)2766 3834 w (\347)2766 3734 w (\347)2766 3634 w (\347)2766 3534 w (\347)2766 3434 w 8 PA f 5220 4266 540 4266 Dl 10 PA f ( string may appear)3 835( A)1 128(As the example shows, a string table index may refer to any byte in the section.)15 3492 3 540 4446 t (more than once; references to substrings may exist; and a single string may be referenced multiple times.)16 4622 1 540 4566 t (Unreferenced strings also are allowed.)4 1698 1 540 4686 t 9 R f (1-16)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 16 22 %%Page: 17 23 save mark 23 pagesetup 16 HB f 5458 516 658 516 Dl (Symbol Table)1 1046 1 658 682 t 10 PA f (An object \256le's symbol table holds information needed to locate and relocate a program's symbolic)14 4359 1 658 1042 t ( 0 both designates)3 793( Index)1 303( symbol table index is a subscript into this array.)9 2137( A)1 128(de\256nitions and references.)2 1167 5 658 1162 t ( contents of the initial entry are)6 1378( The)1 217(the \256rst entry in the table and serves as the unde\256ned symbol index.)12 3020 3 658 1282 t (speci\256ed later in this section.)4 1276 1 658 1402 t (Name Value)1 814 1 2658 1582 t 10 S f (___________________)2523 1602 w 10 CW f (STN_UNDEF 0)1 849 1 2523 1722 t 10 S f (___________________ \347)1 615 1 2523 1778 t (\347)3138 1702 w 10 PA f (A symbol table entry has the following format.)7 2068 1 658 2018 t 8 HB f 5338 2178 658 2178 Dl 9 HB f ( Table Entry)2 515( Symbol)1 375(Figure 1-16:)1 510 3 658 2278 t /oldm /m load def /m {} def gsave 766 -2574 moveto 766 -3554 946 -3554 180 arcto 4 {pop} repeat 5266 -3554 5266 -3374 180 arcto 4 {pop} repeat 5266 -2394 5086 -2394 180 arcto 4 {pop} repeat 766 -2394 766 -2574 180 arcto 4 {pop} repeat 0.999 setgray fill grestore /m /oldm load def 8 CW f 766 3374 766 2574 Dl 766 3374 180 0 0 180 Da 5086 3554 946 3554 Dl 5086 3554 0 -180 180 0 Da 5266 2574 5266 3374 Dl 5266 2574 -180 0 0 -180 Da 946 2394 5086 2394 Dl 946 2394 0 180 -180 0 Da ( {)1 88( t r u c t)5 220( s)1 88(t y p e d e f)6 312 4 908 2674 t ( t _ n a m e ;)7 308( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 2774 t ( t _ v a l u e ;)8 352( s)1 324(E l f 3 2 _ A d d r)9 444 3 1268 2874 t ( t _ s i z e ;)7 308( s)1 324(E l f 3 2 _ W o r d)9 444 3 1268 2974 t ( t _ i n f o ;)7 308( s)1 192( h a r)3 132( c)1 88(u n s i g n e d)7 356 5 1268 3074 t ( t _ o t h e r ;)8 352( s)1 192( h a r)3 132( c)1 88(u n s i g n e d)7 356 5 1268 3174 t ( t _ s h n d x ;)8 352( s)1 324(E l f 3 2 _ H a l f)9 444 3 1268 3274 t ( l f 3 2 _ S y m ;)9 396(} E)1 136 2 908 3374 t 5338 3682 658 3682 Dl 10 CW f (st_name)658 3922 w 10 PA f (This member holds an index into the object \256le's symbol string table, which holds the)14 3767 1 1408 3922 t ( the value is non-zero, it represents a)7 1621( If)1 117(character representations of the symbol names.)5 2079 3 1408 4042 t ( the symbol table entry has no)6 1327( Otherwise,)1 535(string table index that gives the symbol name.)7 2034 3 1408 4162 t (name.)1408 4282 w /oldm /m load def /m {} def gsave newpath 658 -4502 moveto 928 -4502 lineto 928 -4802 lineto 658 -4802 lineto closepath 0.999 setgray fill grestore /m /oldm load def 7 HB f 928 4502 658 4502 Dl 928 4802 928 4502 Dl 658 4802 928 4802 Dl 658 4502 658 4802 Dl 799 4922 799 4802 Dl (NOTE)700 4670 w 9 H f (External C symbols have the same names in C and object \256les' symbol tables.)13 3115 1 1018 4562 t 10 CW f (st_value)658 5122 w 10 PA f ( on the context, this)4 862( Depending)1 545(This member gives the value of the associated symbol.)8 2401 3 1408 5122 t (may be an absolute value, an address, etc.; details appear below.)10 2842 1 1408 5242 t 10 CW f (st_size)658 5422 w 10 PA f ( example, a data object's size is the number of)9 2013( For)1 201(Many symbols have associated sizes.)4 1628 3 1408 5422 t ( member holds 0 if the symbol has no size or an)11 2098( This)1 240(bytes contained in the object.)4 1279 3 1408 5542 t (unknown size.)1 647 1 1408 5662 t 10 CW f (st_info)658 5842 w 10 PA f ( list of the values and)5 939( A)1 128(This member speci\256es the symbol's type and binding attributes.)8 2825 3 1408 5842 t ( following code shows how to manipulate the values.)8 2353( The)1 217(meanings appears below.)2 1124 3 1408 5962 t /oldm /m load def /m {} def gsave 766 -6318 moveto 766 -6798 946 -6798 180 arcto 4 {pop} repeat 5266 -6798 5266 -6618 180 arcto 4 {pop} repeat 5266 -6138 5086 -6138 180 arcto 4 {pop} repeat 766 -6138 766 -6318 180 arcto 4 {pop} repeat 0.999 setgray fill grestore /m /oldm load def 8 CW f 766 6618 766 6318 Dl 766 6618 180 0 0 180 Da 5086 6798 946 6798 Dl 5086 6798 0 -180 180 0 Da 5266 6318 5266 6618 Dl 5266 6318 -180 0 0 -180 Da 946 6138 5086 6138 Dl 946 6138 0 180 -180 0 Da ( \( i \) > > 4 \))7 308( \()1 176( L F 3 2 _ S T _ B I N D \( i \))15 660( E)1 88(# d e f i n e)6 312 5 908 6418 t ( \( i \) & 0 x f \))8 352( \()1 176( L F 3 2 _ S T _ T Y P E \( i \))15 660( E)1 88(# d e f i n e)6 312 5 908 6518 t ( \( \( b \) < < 4 \) + \( \( t \) & 0 x f \) \))19 836( \()1 88( L F 3 2 _ S T _ I N F O \( b , t \))17 748( E)1 88(# d e f i n e)6 312 5 908 6618 t 9 PB f ( Formats Specification, Version 1.1)4 1423( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-17)5173 7324 w cleartomark showpage restore %%EndPage: 17 23 %%Page: 18 24 save mark 24 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 10 CW f (st_other)540 1080 w 10 PA f (This member currently holds 0 and has no de\256ned meaning.)9 2666 1 1290 1080 t 10 CW f (st_shndx)540 1260 w 10 PA f (Every symbol table entry is ``de\256ned'' in relation to some section; this member holds the)14 3903 1 1290 1260 t ( Figure 1-7 and the related text describe, some)8 2030( As)1 170(relevant section header table index.)4 1564 3 1290 1380 t (section indexes indicate special meanings.)4 1855 1 1290 1500 t (A symbol's binding determines the linkage visibility and behavior.)8 2951 1 540 1740 t 8 HB f 5220 1900 540 1900 Dl 9 HB f ( Binding,)1 385( Symbol)1 375(Figure 1-17:)1 510 3 540 2000 t 9 CW f (ELF32_ST_BIND)1835 2000 w 10 PA f (Name Value)1 844 1 2540 2192 t 10 S f (_ ____________________)1 1009 1 2375 2212 t 10 CW f (STB_LOCAL 0)1 939 1 2375 2332 t (STB_GLOBAL 1)1 939 1 2375 2452 t (STB_WEAK 2)1 939 1 2375 2572 t (STB_LOPROC 13)1 939 1 2375 2692 t (STB_HIPROC 15)1 939 1 2375 2812 t 10 S f ( \347)1 -334(_ ____________________)1 1009 2 2375 2868 t (\347)3050 2812 w (\347)3050 2712 w (\347)3050 2612 w (\347)3050 2512 w (\347)3050 2412 w (\347)3050 2312 w 8 PA f 5220 3060 540 3060 Dl 10 CW f (STB_LOCAL)540 3300 w 10 PA f ( Local)1 289(Local symbols are not visible outside the object \256le containing their de\256nition.)11 3451 2 1290 3300 t (symbols of the same name may exist in multiple \256les without interfering with each)13 3658 1 1290 3420 t (other.)1290 3540 w 10 CW f (STB_GLOBAL)540 3720 w 10 PA f ( \256le's de\256nition of a)4 878( One)1 235(Global symbols are visible to all object \256les being combined.)9 2655 3 1290 3720 t (global symbol will satisfy another \256le's unde\256ned reference to the same global symbol.)12 3845 1 1290 3840 t 10 CW f (STB_WEAK)540 4020 w 10 PA f (Weak symbols resemble global symbols, but their de\256nitions have lower precedence.)10 3756 1 1290 4020 t 10 CW f (STB_LOPROC)540 4200 w 10 PA f (through)1165 4200 w 10 CW f (STB_HIPROC)1550 4200 w 10 PA f (Values in this inclusive range are reserved for processor-speci\256c semantics.)9 3317 1 1290 4320 t (Global and weak symbols differ in two major ways.)8 2281 1 540 4560 t 10 S f ()698 4740 w 698 4740 m 50 build_bx 748 4740 m 10 PA f (When the link editor combines several relocatable object \256les, it does not allow multiple de\256nitions)14 4377 1 814 4740 t (of)814 4860 w 10 CW f (STB_GLOBAL)927 4860 w 10 PA f ( the other hand, if a de\256ned global symbol)8 1873( On)1 187(symbols with the same name.)4 1306 3 1560 4860 t ( link edi-)2 393( The)1 217(exists, the appearance of a weak symbol with the same name will not cause an error.)15 3723 3 814 4980 t ( if a common symbol exists)5 1196( Similarly,)1 478(tor honors the global de\256nition and ignores the weak ones.)9 2607 3 814 5100 t (\(i.e., a symbol whose st)4 1021 1 814 5220 t 10 S f (_)1835 5220 w 10 PA f (shndx \256eld holds)2 765 1 1885 5220 t 10 CW f (SHN_COMMON)2675 5220 w 10 PA f (\), the appearance of a weak symbol with)7 1783 1 3275 5220 t ( link editor honors the common de\256nition and ignores)8 2402( The)1 217(the same name will not cause an error.)7 1702 3 814 5340 t (the weak ones.)2 654 1 814 5460 t 10 S f ()698 5640 w 698 5640 m 50 build_bx 748 5640 m 10 PA f (When the link editor searches archive libraries, it extracts archive members that contain de\256nitions)13 4363 1 814 5640 t ( member's de\256nition may be either a global or a weak symbol.)11 2753( The)1 217(of unde\256ned global symbols.)3 1284 3 814 5760 t (The link editor does)3 886 1 814 5880 t 10 PI f (not)1725 5880 w 10 PA f ( Unresolved)1 565(extract archive members to resolve unde\256ned weak symbols.)7 2699 2 1883 5880 t (weak symbols have a zero value.)5 1452 1 814 6000 t (In each symbol table, all symbols with)6 1685 1 540 6240 t 10 CW f (STB_LOCAL)2250 6240 w 10 PA f ( As)1 170(binding precede the weak and global symbols.)6 2056 2 2823 6240 t (``Sections'' above describes, a symbol table section's)6 2291 1 540 6360 t 10 CW f (sh_info)2856 6360 w 10 PA f (section header member holds the symbol)5 1815 1 3309 6360 t (table index for the \256rst non-local symbol.)6 1817 1 540 6480 t 9 R f (1-18)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 18 24 %%Page: 19 25 save mark 25 pagesetup 9 HB f 3841 540 658 540 Dl (ELF: Executable and Linkable Format)4 1605 1 3913 540 t 10 PA f (A symbol's type provides a general classi\256cation for the associated entity.)10 3259 1 658 1020 t 8 HB f 5338 1180 658 1180 Dl 9 HB f ( Types,)1 310( Symbol)1 375(Figure 1-18:)1 510 3 658 1280 t 9 CW f (ELF32_ST_TYPE)1878 1280 w 10 PA f (Name Value)1 874 1 2658 1472 t 10 S f (_ _____________________)1 1069 1 2463 1492 t 10 CW f (STT_NOTYPE 0)1 999 1 2463 1612 t (STT_OBJECT 1)1 999 1 2463 1732 t (STT_FUNC 2)1 999 1 2463 1852 t (STT_SECTION 3)1 999 1 2463 1972 t (STT_FILE 4)1 999 1 2463 2092 t (STT_LOPROC 13)1 999 1 2463 2212 t (STT_HIPROC 15)1 999 1 2463 2332 t 10 S f ( \347)1 -334(_ _____________________)1 1069 2 2463 2388 t (\347)3198 2292 w (\347)3198 2192 w (\347)3198 2092 w (\347)3198 1992 w (\347)3198 1892 w (\347)3198 1792 w (\347)3198 1692 w (\347)3198 1592 w 8 PA f 5338 2580 658 2580 Dl 10 CW f (STT_NOTYPE)658 2820 w 10 PA f (The symbol's type is not speci\256ed.)5 1519 1 1458 2820 t 10 CW f (STT_OBJECT)658 3000 w 10 PA f (The symbol is associated with a data object, such as a variable, an array, etc.)14 3344 1 1458 3000 t 10 CW f (STT_FUNC)658 3180 w 10 PA f (The symbol is associated with a function or other executable code.)10 2919 1 1458 3180 t 10 CW f (STT_SECTION)658 3360 w 10 PA f ( table entries of this type exist pri-)7 1501( Symbol)1 386(The symbol is associated with a section.)6 1754 3 1458 3360 t (marily for relocation and normally have)5 1772 1 1458 3480 t 10 CW f (STB_LOCAL)3255 3480 w 10 PA f (binding.)3828 3480 w 10 CW f (STT_FILE)658 3660 w 10 PA f (Conventionally, the symbol's name gives the name of the source \256le associated with the)13 3877 1 1458 3660 t ( \256le symbol has)3 688( A)1 128(object \256le.)1 446 3 1458 3780 t 10 CW f (STB_LOCAL)2745 3780 w 10 PA f (binding, its section index is)4 1203 1 3318 3780 t 10 CW f (SHN_ABS)4546 3780 w 10 PA f (, and it)2 306 1 4974 3780 t (precedes the other)2 814 1 1458 3900 t 10 CW f (STB_LOCAL)2297 3900 w 10 PA f (symbols for the \256le, if it is present.)7 1521 1 2870 3900 t 10 CW f (STT_LOPROC)658 4080 w 10 PA f (through)1283 4080 w 10 CW f (STT_HIPROC)1668 4080 w 10 PA f (Values in this inclusive range are reserved for processor-speci\256c semantics.)9 3317 1 1458 4200 t (Function symbols \(those with type)4 1529 1 658 4440 t 10 CW f (STT_FUNC)2212 4440 w 10 PA f ( When)1 314(\) in shared object \256les have special signi\256cance.)7 2090 2 2700 4440 t (another object \256le references a function from a shared object, the link editor automatically creates a pro-)16 4581 1 658 4560 t ( object symbols with types other than)6 1650( Shared)1 360(cedure linkage table entry for the referenced symbol.)7 2337 3 658 4680 t 10 CW f (STT_FUNC)658 4800 w 10 PA f (will not be referenced automatically through the procedure linkage table.)9 3239 1 1171 4800 t (If a symbol's value refers to a speci\256c location within a section, its section index member,)15 3927 1 658 4980 t 10 CW f (st_shndx)4610 4980 w 10 PA f (,)5098 4980 w ( the section moves during relocation, the symbol's value)8 2484( As)1 170(holds an index into the section header table.)7 1944 3 658 5100 t (changes as well, and references to the symbol continue to ``point'' to the same location in the program.)17 4525 1 658 5220 t (Some special section index values give other semantics.)7 2445 1 658 5340 t 10 CW f (SHN_ABS)658 5520 w 10 PA f (The symbol has an absolute value that will not change because of relocation.)12 3370 1 1408 5520 t 10 CW f (SHN_COMMON)658 5700 w 10 PA f ( symbol's value)2 688( The)1 217(The symbol labels a common block that has not yet been allocated.)11 2937 3 1408 5700 t (gives alignment constraints, similar to a section's)6 2163 1 1408 5820 t 10 CW f (sh_addralign)3596 5820 w 10 PA f ( is, the)2 285(member. That)1 644 2 4349 5820 t (link editor will allocate the storage for the symbol at an address that is a multiple of)16 3695 1 1408 5940 t 10 CW f (st_value)1408 6060 w 10 PA f ( symbol's size tells how many bytes are required.)8 2172(. The)1 242 2 1896 6060 t 10 CW f (SHN_UNDEF)658 6240 w 10 PA f ( the link editor combines)4 1096( When)1 314(This section table index means the symbol is unde\256ned.)8 2463 3 1408 6240 t (this object \256le with another that de\256nes the indicated symbol, this \256le's references to the)14 3893 1 1408 6360 t (symbol will be linked to the actual de\256nition.)7 2004 1 1408 6480 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-19)5173 7324 w cleartomark showpage restore %%EndPage: 19 25 %%Page: 20 26 save mark 26 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 10 PA f (As mentioned above, the symbol table entry for index 0 \()10 2510 1 540 1020 t 10 CW f (STN_UNDEF)3050 1020 w 10 PA f (\) is reserved; it holds the following.)6 1560 1 3590 1020 t 8 HB f 5220 1180 540 1180 Dl 9 HB f ( Table Entry: Index 0)4 880( Symbol)1 375(Figure 1-19:)1 510 3 540 1280 t 10 PA f ( Note)1 894(Name Value)1 924 2 1831 1472 t 10 S f (_ ______________________________________________)1 2308 1 1726 1492 t 10 CW f (st_name 0)1 930 1 1726 1612 t 10 PA f (No name)1 407 1 3046 1612 t 10 CW f (st_value 0)1 930 1 1726 1732 t 10 PA f (Zero value)1 478 1 3046 1732 t 10 CW f (st_size 0)1 930 1 1726 1852 t 10 PA f (No size)1 332 1 3046 1852 t 10 CW f (st_info 0)1 930 1 1726 1972 t 10 PA f (No type, local binding)3 988 1 3046 1972 t 10 CW f (st_other 0)1 930 1 1726 2092 t (st_shndx SHN_UNDEF)1 1170 1 1726 2212 t 10 PA f (No section)1 472 1 3046 2212 t 10 S f ( \347)1 -1753(_ ______________________________________________)1 2308 2 1726 2268 t (\347)2281 2192 w (\347)2281 2092 w (\347)2281 1992 w (\347)2281 1892 w (\347)2281 1792 w (\347)2281 1692 w (\347)2281 1592 w (\347)2971 2268 w (\347)2971 2192 w (\347)2971 2092 w (\347)2971 1992 w (\347)2971 1892 w (\347)2971 1792 w (\347)2971 1692 w (\347)2971 1592 w 8 PA f 5220 2460 540 2460 Dl 14 HB f (Symbol Values)1 997 1 540 2900 t 10 PA f (Symbol table entries for different object \256le types have slightly different interpretations for the)13 4170 1 540 3140 t 10 CW f (st_value)540 3260 w 10 PA f (member.)1053 3260 w 10 S f ()698 3440 w 698 3440 m 50 build_bx 748 3440 m 10 PA f (In relocatable \256les,)2 828 1 814 3440 t 10 CW f (st_value)1667 3440 w 10 PA f (holds alignment constraints for a symbol whose section index is)9 2820 1 2180 3440 t 10 CW f (SHN_COMMON)814 3560 w 10 PA f (.)1422 3560 w 10 S f ()698 3740 w 698 3740 m 50 build_bx 748 3740 m 10 PA f (In relocatable \256les,)2 828 1 814 3740 t 10 CW f (st_value)1667 3740 w 10 PA f ( is,)1 121( That)1 252(holds a section offset for a de\256ned symbol.)7 1888 3 2180 3740 t 10 CW f (st_value)4466 3740 w 10 PA f (is an)1 204 1 4979 3740 t (offset from the beginning of the section that)7 1931 1 814 3860 t 10 CW f (st_shndx)2770 3860 w 10 PA f (identi\256es.)3283 3860 w 10 S f ()698 4040 w 698 4040 m 50 build_bx 748 4040 m 10 PA f (In executable and shared object \256les,)5 1615 1 814 4040 t 10 CW f (st_value)2454 4040 w 10 PA f ( make these \256les' sym-)4 998( To)1 166(holds a virtual address.)3 1036 3 2967 4040 t (bols more useful for the dynamic linker, the section offset \(\256le interpretation\) gives way to a virtual)16 4387 1 814 4160 t (address \(memory interpretation\) for which the section number is irrelevant.)9 3348 1 814 4280 t (Although the symbol table values have similar meanings for different object \256les, the data allow ef\256cient)15 4621 1 540 4580 t (access by the appropriate programs.)4 1601 1 540 4700 t 9 R f (1-20)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 20 26 %%Page: 21 27 save mark 27 pagesetup 16 HB f 5458 516 658 516 Dl (Relocation)658 682 w 10 PA f ( example, when)2 697( For)1 201(Relocation is the process of connecting symbolic references with symbolic de\256nitions.)10 3777 3 658 1042 t (a program calls a function, the associated call instruction must transfer control to the proper destination)15 4586 1 658 1162 t ( other words, relocatable \256les must have information that describes how to)11 3306( In)1 142(address at execution.)2 929 3 658 1282 t (modify their section contents, thus allowing executable and shared object \256les to hold the right informa-)15 4597 1 658 1402 t (tion for a process's program image.)5 1564 1 658 1522 t 10 PI f (Relocation entries)1 722 1 2272 1522 t 10 PA f (are these data.)2 636 1 3019 1522 t 8 HB f 5338 1682 658 1682 Dl 9 HB f ( Entries)1 330( Relocation)1 510(Figure 1-20:)1 510 3 658 1782 t /oldm /m load def /m {} def gsave 766 -2078 moveto 766 -3258 946 -3258 180 arcto 4 {pop} repeat 5266 -3258 5266 -3078 180 arcto 4 {pop} repeat 5266 -1898 5086 -1898 180 arcto 4 {pop} repeat 766 -1898 766 -2078 180 arcto 4 {pop} repeat 0.999 setgray fill grestore /m /oldm load def 8 CW f 766 3078 766 2078 Dl 766 3078 180 0 0 180 Da 5086 3258 946 3258 Dl 5086 3258 0 -180 180 0 Da 5266 2078 5266 3078 Dl 5266 2078 -180 0 0 -180 Da 946 1898 5086 1898 Dl 946 1898 0 180 -180 0 Da ( {)1 88( t r u c t)5 220( s)1 88(t y p e d e f)6 312 4 908 2178 t ( _ o f f s e t ;)8 352( r)1 324(E l f 3 2 _ A d d r)9 444 3 1268 2278 t ( _ i n f o ;)6 264( r)1 324(E l f 3 2 _ W o r d)9 444 3 1268 2378 t ( l f 3 2 _ R e l ;)9 396(} E)1 136 2 908 2478 t ( {)1 88( t r u c t)5 220( s)1 88(t y p e d e f)6 312 4 908 2678 t ( _ o f f s e t ;)8 352( r)1 324(E l f 3 2 _ A d d r)9 444 3 1268 2778 t ( _ i n f o ;)6 264( r)1 324(E l f 3 2 _ W o r d)9 444 3 1268 2878 t ( _ a d d e n d ;)8 352( r)1 280(E l f 3 2 _ S w o r d)10 488 3 1268 2978 t ( l f 3 2 _ R e l a ;)10 440(} E)1 136 2 908 3078 t 5338 3386 658 3386 Dl 10 CW f (r_offset)658 3626 w 10 PA f ( a relocatable)2 581( For)1 201(This member gives the location at which to apply the relocation action.)11 3127 3 1258 3626 t (\256le, the value is the byte offset from the beginning of the section to the storage unit affected)17 4035 1 1258 3746 t ( an executable \256le or a shared object, the value is the virtual address of)14 3111( For)1 201(by the relocation.)2 766 3 1258 3866 t (the storage unit affected by the relocation.)6 1859 1 1258 3986 t 10 CW f (r_info)658 4166 w 10 PA f (This member gives both the symbol table index with respect to which the relocation must be)15 4075 1 1258 4166 t ( example, a call instruction's relocation entry)6 1979( For)1 201(made, and the type of relocation to apply.)7 1849 3 1258 4286 t ( the index is)3 533( If)1 117(would hold the symbol table index of the function being called.)10 2797 3 1258 4406 t 10 CW f (STN_UNDEF)4730 4406 w 10 PA f (,)5278 4406 w ( types)1 264( Relocation)1 518(the unde\256ned symbol index, the relocation uses 0 as the ``symbol value.'')11 3225 3 1258 4526 t ( the text refers to a relocation entry's relocation type or symbol)11 2773( When)1 314(are processor-speci\256c.)1 975 3 1258 4646 t (table index, it means the result of applying)7 1888 1 1258 4766 t 10 CW f (ELF32_R_TYPE)3171 4766 w 10 PA f (or)3924 4766 w 10 CW f (ELF32_R_SYM)4044 4766 w 10 PA f (, respectively,)1 608 1 4712 4766 t (to the entry's)2 582 1 1258 4886 t 10 CW f (r_info)1865 4886 w 10 PA f (member.)2258 4886 w /oldm /m load def /m {} def gsave 766 -5242 moveto 766 -5722 946 -5722 180 arcto 4 {pop} repeat 5266 -5722 5266 -5542 180 arcto 4 {pop} repeat 5266 -5062 5086 -5062 180 arcto 4 {pop} repeat 766 -5062 766 -5242 180 arcto 4 {pop} repeat 0.999 setgray fill grestore /m /oldm load def 8 CW f 766 5542 766 5242 Dl 766 5542 180 0 0 180 Da 5086 5722 946 5722 Dl 5086 5722 0 -180 180 0 Da 5266 5242 5266 5542 Dl 5266 5242 -180 0 0 -180 Da 946 5062 5086 5062 Dl 946 5062 0 180 -180 0 Da ( \( i \) > > 8 \))7 308( \()1 220( L F 3 2 _ R _ S Y M \( i \))13 572( E)1 88(# d e f i n e)6 312 5 908 5342 t ( h a r \) \( i \) \))8 352( c)1 88( \( u n s i g n e d)9 396( \()1 176( L F 3 2 _ R _ T Y P E \( i \))14 616( E)1 88(# d e f i n e)6 312 7 908 5442 t ( h a r \) \( t \) \))8 352( c)1 88( \( \( s \) < < 8 \) + \( u n s i g n e d)18 792( \()1 88( L F 3 2 _ R _ I N F O \( s , t \))16 704( E)1 88(# d e f i n e)6 312 7 908 5542 t 10 CW f (r_addend)658 5966 w 10 PA f (This member speci\256es a constant addend used to compute the value to be stored into the)15 3921 1 1258 5966 t (relocatable \256eld.)1 730 1 1258 6086 t (As shown above, only)3 978 1 658 6326 t 10 CW f (Elf32_Rela)1661 6326 w 10 PA f ( of type)2 335( Entries)1 361(entries contain an explicit addend.)4 1521 3 2294 6326 t 10 CW f (Elf32_Rel)4536 6326 w 10 PA f (store)5109 6326 w ( on the processor architecture, one form or)7 1877( Depending)1 545(an implicit addend in the location to be modi\256ed.)8 2186 3 658 6446 t ( an implementation for a particular)5 1552( Consequently,)1 689(the other might be necessary or more convenient.)7 2181 3 658 6566 t (machine may use one form exclusively or either form depending on context.)11 3371 1 658 6686 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-21)5173 7324 w cleartomark showpage restore %%EndPage: 21 27 %%Page: 22 28 save mark 28 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 10 PA f ( section)1 334( The)1 217(A relocation section references two other sections: a symbol table and a section to modify.)14 3961 3 540 1020 t (header's)540 1140 w 10 CW f (sh_info)940 1140 w 10 PA f (and)1393 1140 w 10 CW f (sh_link)1587 1140 w 10 PA f (members, described in ``Sections'' above, specify these relationships.)7 3026 1 2040 1140 t (Relocation entries for different object \256les have slightly different interpretations for the)11 3840 1 540 1260 t 10 CW f (r_offset)4405 1260 w 10 PA f (member.)540 1380 w 10 S f ()698 1560 w 698 1560 m 50 build_bx 748 1560 m 10 PA f (In relocatable \256les,)2 828 1 814 1560 t 10 CW f (r_offset)1667 1560 w 10 PA f ( is, the relocation section itself describes)6 1758( That)1 252(holds a section offset.)3 948 3 2180 1560 t (how to modify another section in the \256le; relocation offsets designate a storage unit within the)15 4156 1 814 1680 t (second section.)1 667 1 814 1800 t 10 S f ()698 1980 w 698 1980 m 50 build_bx 748 1980 m 10 PA f (In executable and shared object \256les,)5 1615 1 814 1980 t 10 CW f (r_offset)2454 1980 w 10 PA f ( make these \256les' relo-)4 984( To)1 166(holds a virtual address.)3 1036 3 2967 1980 t (cation entries more useful for the dynamic linker, the section offset \(\256le interpretation\) gives way to)15 4401 1 814 2100 t (a virtual address \(memory interpretation\).)4 1871 1 814 2220 t (Although the interpretation of)3 1343 1 540 2520 t 10 CW f (r_offset)1908 2520 w 10 PA f (changes for different object \256les to allow ef\256cient access by the)10 2763 1 2421 2520 t (relevant programs, the relocation types' meanings stay the same.)8 2867 1 540 2640 t 14 HB f (Relocation Types)1 1157 1 540 3020 t 10 PA f (Relocation entries describe how to alter the following instruction and data \256elds \(bit numbers appear in)15 4579 1 540 3260 t (the lower box corners\).)3 1016 1 540 3380 t 8 HB f 5220 3540 540 3540 Dl 9 HB f ( Fields)1 285( Relocatable)1 555(Figure 1-21:)1 510 3 540 3640 t 10 PA f 1930 3832 1930 4048 Dl 3830 3832 1930 3832 Dl 3830 4048 3830 3832 Dl 1930 4048 3830 4048 Dl 10 PI f (word32)2728 3960 w 6 PA f (31 0)1 1880 1 1940 4032 t 8 PA f 5220 4240 540 4240 Dl 10 PI f (word32)540 4480 w 10 PA f ( values use)2 485( These)1 307(This speci\256es a 32-bit \256eld occupying 4 bytes with arbitrary byte alignment.)11 3346 3 1040 4480 t (the same byte order as other word values in the 32-bit Intel Architecture.)12 3211 1 1040 4600 t 2404 4870 2404 5086 Dl 2879 4870 2404 4870 Dl 2879 5086 2879 4870 Dl 2404 5086 2879 5086 Dl 10 CW f (01)2582 4998 w 6 PA f (3)2414 4926 w (31)2414 5070 w 10 PA f 2879 4870 2879 5086 Dl 3354 4870 2879 4870 Dl 3354 5086 3354 4870 Dl 2879 5086 3354 5086 Dl 10 CW f (02)3057 4998 w 6 PA f (2)2889 4926 w 10 PA f 3354 4870 3354 5086 Dl 3829 4870 3354 4870 Dl 3830 5086 3830 4870 Dl 3355 5086 3830 5086 Dl 10 CW f (03)3532 4998 w 6 PA f (1)3364 4926 w 10 PA f 3830 4870 3830 5086 Dl 4305 4870 3830 4870 Dl 4305 5086 4305 4870 Dl 3830 5086 4305 5086 Dl 10 CW f (04)4007 4998 w 6 PA f (0)3840 4926 w (0)4265 5070 w 10 CW f (0x01020304)1696 4998 w 10 PA f (Calculations below assume the actions are transforming a relocatable \256le into either an executable or a)15 4515 1 540 5446 t ( the link editor merges one or more relocatable \256les to form the output.)13 3141( Conceptually,)1 668(shared object \256le.)2 770 3 540 5566 t (It \256rst decides how to combine and locate the input \256les, then updates the symbol values, and \256nally per-)18 4657 1 540 5686 t ( applied to executable or shared object \256les are similar and accomplish)11 3112( Relocations)1 560(forms the relocation.)2 913 3 540 5806 t ( below use the following notation.)5 1507( Descriptions)1 607(the same result.)2 694 3 540 5926 t 10 CW f (A)540 6106 w 10 PA f (This means the addend used to compute the value of the relocatable \256eld.)12 3255 1 1040 6106 t 10 CW f (B)540 6286 w 10 PA f (This means the base address at which a shared object has been loaded into memory during)15 4008 1 1040 6286 t ( a shared object \256le is built with a 0 base virtual address, but the execu-)15 3133(execution. Generally,)1 961 2 1040 6406 t (tion address will be different.)4 1300 1 1040 6526 t 9 R f (1-22)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 22 28 %%Page: 23 29 save mark 29 pagesetup 9 HB f 3841 540 658 540 Dl (ELF: Executable and Linkable Format)4 1605 1 3913 540 t 10 CW f (G)658 1020 w 10 PA f (This means the offset into the global offset table at which the address of the relocation entry's)16 4117 1 1158 1020 t ( ``Global Offset Table'' in Part 2 for more informa-)9 2207( See)1 199(symbol will reside during execution.)4 1619 3 1158 1140 t (tion.)1158 1260 w 10 CW f (GOT)658 1440 w 10 PA f ( ``Global Offset Table'' in Part 2 for more)8 1796( See)1 199(This means the address of the global offset table.)8 2144 3 1158 1440 t (information.)1158 1560 w 10 CW f (L)658 1740 w 10 PA f (This means the place \(section offset or address\) of the procedure linkage table entry for a sym-)16 4160 1 1158 1740 t ( The)1 217( procedure linkage table entry redirects a function call to the proper destination.)12 3540(bol. A)1 292 3 1158 1860 t (link editor builds the initial procedure linkage table, and the dynamic linker modi\256es the)13 3934 1 1158 1980 t ( ``Procedure Linkage Table'' in Part 2 for more information.)9 2626( See)1 199(entries during execution.)2 1104 3 1158 2100 t 10 CW f (P)658 2280 w 10 PA f (This means the place \(section offset or address\) of the storage unit being relocated \(computed)14 4121 1 1158 2280 t (using)1158 2400 w 10 CW f (r_offset)1428 2400 w 10 PA f (\).)1916 2400 w 10 CW f (S)658 2580 w 10 PA f (This means the value of the symbol whose index resides in the relocation entry.)13 3506 1 1158 2580 t (A relocation entry's)2 874 1 658 2820 t 10 CW f (r_offset)1557 2820 w 10 PA f (value designates the offset or virtual address of the \256rst byte of the)12 2951 1 2070 2820 t ( relocation type speci\256es which bits to change and how to calculate their values.)13 3528( The)1 217(affected storage unit.)2 929 3 658 2940 t (The SYSTEM V architecture uses only)5 1671 1 658 3060 t 10 CW f (Elf32_Rel)2354 3060 w 10 PA f (relocation entries, the \256eld to be relocated holds the)8 2285 1 2927 3060 t ( all cases, the addend and the computed result use the same byte order.)13 3149(addend. In)1 506 2 658 3180 t 8 HB f 5338 3340 658 3340 Dl 9 HB f ( Types)1 285( Relocation)1 510(Figure 1-22:)1 510 3 658 3440 t 10 PA f ( Calculation)1 775( Field)1 414(Name Value)1 964 3 2026 3632 t 10 S f (_ __________________________________________________)1 2514 1 1741 3652 t 10 CW f (R_386_NONE 0)1 1179 1 1741 3772 t 10 PA f (none none)1 674 1 3140 3772 t 10 CW f (R_386_32 1)1 1179 1 1741 3892 t 10 PI f (word32)3140 3892 w 10 CW f (S + A)2 300 1 3595 3892 t (R_386_PC32 2)1 1179 1 1741 4012 t 10 PI f (word32)3140 4012 w 10 CW f (S + A - P)4 540 1 3595 4012 t (R_386_GOT32 3)1 1179 1 1741 4132 t 10 PI f (word32)3140 4132 w 10 CW f (G + A - P)4 540 1 3595 4132 t (R_386_PLT32 4)1 1179 1 1741 4252 t 10 PI f (word32)3140 4252 w 10 CW f (L + A - P)4 540 1 3595 4252 t (R_386_COPY 5)1 1179 1 1741 4372 t 10 PA f (none none)1 674 1 3140 4372 t 10 CW f (R_386_GLOB_DAT 6)1 1179 1 1741 4492 t 10 PI f (word32)3140 4492 w 10 CW f (S)3595 4492 w (R_386_JMP_SLOT 7)1 1179 1 1741 4612 t 10 PI f (word32)3140 4612 w 10 CW f (S)3595 4612 w (R_386_RELATIVE 8)1 1179 1 1741 4732 t 10 PI f (word32)3140 4732 w 10 CW f (B + A)2 300 1 3595 4732 t (R_386_GOTOFF 9)1 1179 1 1741 4852 t 10 PI f (word32)3140 4852 w 10 CW f (S + A - GOT)4 660 1 3595 4852 t (R_386_GOTPC 10)1 1179 1 1741 4972 t 10 PI f (word32)3140 4972 w 10 CW f (GOT + A - P)4 660 1 3595 4972 t 10 S f ( \347)1 -1599(_ __________________________________________________)1 2514 2 1741 5028 t (\347)2656 4952 w (\347)2656 4852 w (\347)2656 4752 w (\347)2656 4652 w (\347)2656 4552 w (\347)2656 4452 w (\347)2656 4352 w (\347)2656 4252 w (\347)2656 4152 w (\347)2656 4052 w (\347)2656 3952 w (\347)2656 3852 w (\347)2656 3752 w (\347)3065 5028 w (\347)3065 4952 w (\347)3065 4852 w (\347)3065 4752 w (\347)3065 4652 w (\347)3065 4552 w (\347)3065 4452 w (\347)3065 4352 w (\347)3065 4252 w (\347)3065 4152 w (\347)3065 4052 w (\347)3065 3952 w (\347)3065 3852 w (\347)3065 3752 w (\347)3520 5028 w (\347)3520 4952 w (\347)3520 4852 w (\347)3520 4752 w (\347)3520 4652 w (\347)3520 4552 w (\347)3520 4452 w (\347)3520 4352 w (\347)3520 4252 w (\347)3520 4152 w (\347)3520 4052 w (\347)3520 3952 w (\347)3520 3852 w (\347)3520 3752 w 8 PA f 5338 5220 658 5220 Dl 10 PA f (Some relocation types have semantics beyond simple calculation.)7 2880 1 658 5520 t 10 CW f (R_386_GOT32)658 5700 w 10 PA f (This relocation type computes the distance from the base of the global offset)12 3357 1 1758 5700 t ( additionally instructs the link)4 1332( It)1 117(table to the symbol's global offset table entry.)7 2005 3 1758 5820 t (editor to build a global offset table.)6 1546 1 1758 5940 t 10 CW f (R_386_PLT32)658 6120 w 10 PA f (This relocation type computes the address of the symbol's procedure linkage)10 3395 1 1758 6120 t (table entry and additionally instructs the link editor to build a procedure linkage)12 3571 1 1758 6240 t (table.)1758 6360 w 10 CW f (R_386_COPY)658 6540 w 10 PA f ( offset)1 269( Its)1 159(The link editor creates this relocation type for dynamic linking.)9 2789 3 1758 6540 t ( symbol table index)3 863( The)1 217(member refers to a location in a writable segment.)8 2211 3 1758 6660 t (speci\256es a symbol that should exist both in the current object \256le and in a shared)15 3558 1 1758 6780 t ( execution, the dynamic linker copies data associated with the)9 2730(object. During)1 653 2 1758 6900 t (shared object's symbol to the location speci\256ed by the offset.)9 2669 1 1758 7020 t 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 851(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (1-23)5173 7324 w cleartomark showpage restore %%EndPage: 23 29 %%Page: 24 30 save mark 30 pagesetup 9 HB f (ELF: Executable and Linkable Format)4 1605 1 540 540 t 5400 540 2217 540 Dl 10 CW f (R_386_GLOB_DAT)540 1020 w 10 PA f (This relocation type is used to set a global offset table entry to the address of the)16 3537 1 1640 1020 t ( special relocation type allows one to determine the)8 2269( The)1 217(speci\256ed symbol.)1 768 3 1640 1140 t (correspondence between symbols and global offset table entries.)7 2841 1 1640 1260 t 10 CW f (R_3862_JMP_SLOT)540 1440 w 10 PA f ( offset)1 269( Its)1 159(The link editor creates this relocation type for dynamic linking.)9 2789 3 1640 1440 t ( dynamic)1 411( The)1 217(member gives the location of a procedure linkage table entry.)9 2710 3 1640 1560 t (linker modi\256es the procedure linkage table entry to transfer control to the desig-)12 3557 1 1640 1680 t (nated symbol's address [see ``Procedure Linkage Table'' in Part 2].)9 2932 1 1640 1800 t 10 CW f (R_386_RELATIVE)540 1980 w 10 PA f ( offset)1 269( Its)1 159(The link editor creates this relocation type for dynamic linking.)9 2789 3 1640 1980 t (member gives a location within a shared object that contains a value represent-)12 3484 1 1640 2100 t ( dynamic linker computes the corresponding virtual)6 2308( The)1 217(ing a relative address.)3 970 3 1640 2220 t (address by adding the virtual address at which the shared object was loaded to)13 3493 1 1640 2340 t ( entries for this type must specify 0 for the sym-)10 2106( Relocation)1 518(the relative address.)2 891 3 1640 2460 t (bol table index.)2 677 1 1640 2580 t 10 CW f (R_386_GOTOFF)540 2760 w 10 PA f (This relocation type computes the difference between a symbol's value and the)11 3483 1 1640 2760 t ( additionally instructs the link editor to build)7 1995( It)1 117(address of the global offset table.)5 1454 3 1640 2880 t (the global offset table.)3 972 1 1640 3000 t 10 CW f (R_386_GOTPC)540 3180 w 10 PA f (This relocation type resembles)3 1343 1 1640 3180 t 10 CW f (R_386_PC32)3008 3180 w 10 PA f (, except it uses the address of the)7 1449 1 3616 3180 t ( symbol referenced in this relocation)5 1608( The)1 217(global offset table in its calculation.)5 1555 3 1640 3300 t (normally is)1 501 1 1640 3420 t 10 CW f (_GLOBAL_OFFSET_TABLE_)2166 3420 w 10 PA f (, which additionally instructs the link)5 1654 1 3434 3420 t (editor to build the global offset table.)6 1635 1 1640 3540 t 9 R f (1-24)540 7324 w 9 PB f ( Interface Standards \(TIS\))3 1059( Tool)1 535(Portable Formats Speci\256cation, Version 1.1)4 1758 3 1868 7324 t cleartomark showpage restore %%EndPage: 24 30 %%Page: 1 31 save mark 31 pagesetup 16 HB f 5458 516 658 516 Dl 36 HB f (2)898 808 w 18 HB f (PROGRAM LOADING AND DYNAMIC LINKING)4 3940 1 1378 682 t 9 HB f 5458 1626 658 1626 Dl 13 HB f (Introduction)1378 1740 w 9 H f (2-1)5170 1740 w 5458 2106 658 2106 Dl 13 HB f (Program Header)1 1015 1 1378 2220 t 9 H f (2-2)5170 2220 w 10 H f (Base Address)1 625 1 1378 2340 t 9 H f (2-4)5170 2340 w 10 H f (Note Section)1 575 1 1378 2460 t 9 H f (2-4)5170 2460 w 5458 2826 658 2826 Dl 13 HB f (Program Loading)1 1076 1 1378 2940 t 9 H f (2-7)5170 2940 w 5458 3306 658 3306 Dl 13 HB f (Dynamic Linking)1 1041 1 1378 3420 t 9 H f (2-10)5170 3420 w 10 H f (Program Interpreter)1 875 1 1378 3540 t 9 H f (2-10)5170 3540 w 10 H f (Dynamic Linker)1 690 1 1378 3660 t 9 H f (2-10)5170 3660 w 10 H f (Dynamic Section)1 752 1 1378 3780 t 9 H f (2-11)5170 3780 w 10 H f (Shared Object Dependencies)2 1312 1 1378 3900 t 9 H f (2-15)5170 3900 w 10 H f (Global Offset Table)2 865 1 1378 4020 t 9 H f (2-16)5170 4020 w 10 H f (Procedure Linkage Table)2 1122 1 1378 4140 t 9 H f (2-17)5170 4140 w 10 H f (Hash Table)1 513 1 1378 4260 t 9 H f (2-19)5170 4260 w 10 H f (Initialization and Termination Functions)3 1740 1 1378 4380 t 9 H f (2-20)5170 4380 w 9 PB f ( Formats Speci\256cation, Version 1.1)4 1413( Portable)1 713(Tool Interface Standards \(TIS\))3 1249 3 658 7324 t 9 R f (i)5313 7324 w cleartomark showpage restore %%EndPage: 1 31 %%Page: 1 32 save mark 32 pagesetup 16 HB f 5458 516 658 516 Dl (Introduction)658 682 w 10 PA f ( infor-)1 273( Some)1 294(Part 2 describes the object \256le information and system actions t