13.07.2015 Views

Full Generic System V ABI

Full Generic System V ABI

Full Generic System V ABI

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 4-1: Object File Format______________________Linking View ______________________Execution View_ ⎜_____________________ELF header ⎜ ⎜______________________ELF header ⎜⎜⎜ ⎜⎜⎜Program header table ⎜ ⎜ Program header table ⎜_ ⎜_____________________optional ⎜ ⎜______________________⎜⎜_ _____________________Section 1 ⎜ ⎜⎜⎜ . . . ⎜ ⎜ Segment 1 ⎜⎜_ _____________________ ⎜ ⎜______________________⎜⎜_ _____________________Section n ⎜ ⎜⎜⎜ . . . ⎜ ⎜ Segment 2 ⎜⎜_ _____________________ ______________________. . . ⎜ ⎜ . . . ⎜_ ⎜_____________________⎜ ⎜______________________⎜⎜ Section header table ⎜ ⎜ Section header table ⎜⎜⎜ ⎜_ ___________________________________________optional ⎜An ELF header resides at the beginning and holds a ‘‘road map’’ describing thefile’s organization. Sections hold the bulk of object file information for the linkingview: instructions, data, symbol table, relocation information, and so on. Descriptionsof special sections appear later in the chapter. Chapter 5 discusses segmentsand the program execution view of the file.A program header table, if present, tells the system how to create a process image.Files used to build a process image (execute a program) must have a programheader table; relocatable files do not need one. A section header table contains informationdescribing the file’s sections. Every section has an entry in the table; eachentry gives information such as the section name, the section size, etc. Files usedduring linking must have a section header table; other object files may or may nothave one.NOTEAlthough the figure shows the program header table immediately after theELF header, and the section header table following the sections, actual filesmay differ. Moreover, sections and segments have no specified order. Onlythe ELF header has a fixed position in the file.4-2 OBJECT FILES

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!