DOC PREVIEW
USF CS 635 - Executable and Linkable Format

This preview shows page 1-2-3-4-28-29-30-31-57-58-59-60 out of 60 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 60 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

IExecutable and Linkable Format (ELF)ContentsPreface1OBJECT FILESIntroduction 1-1ELF Header 1-3Sections 1-8String Table 1-16Symbol Table 1-17Relocation 1-212PROGRAM LOADING AND DYNAMIC LINKINGIntroduction 2-1Program Header 2-2Program Loading 2-7Dynamic Linking 2-103C LIBRARYC Library 3-1IIndexIndex I-1Tool Interface Standards (TIS) Portable Formats Specification, Version 1.1 iELF: Executable and Linkable Formatii Portable Formats Specification, Version 1.1 Tool Interface Standards (TIS)Figures and TablesFigure 1-1: Object File Format 1-1Figure 1-2: 32-Bit Data Types 1-2Figure 1-3: ELF Header 1-3Figure 1-4: e _ i d e n t [ ] Identification Indexes 1-5Figure 1-5: Data Encoding E L F D A T A 2 L S B 1-6Figure 1-6: Data Encoding E L F D A T A 2 M S B 1-6Figure 1-7: 32-bit Intel Architecture Identification, e _ i d e n t 1-7Figure 1-8: Special Section Indexes 1-8Figure 1-9: Section Header 1-9Figure 1-10: Section Types, s h _ t y p e 1-10Figure 1-11: Section Header Table Entry: Index 0 1-11Figure 1-12: Section Attribute Flags, s h _ f l a g s 1-12Figure 1-13: s h _ l i n k and s h _ i n f o Interpretation 1-13Figure 1-14: Special Sections 1-13Figure 1-15: String Table Indexes 1-16Figure 1-16: Symbol Table Entry 1-17Figure 1-17: Symbol Binding, E L F 3 2 _ S T _ B I N D 1-18Figure 1-18: Symbol Types, E L F 3 2 _ S T _ T Y P E 1-19Figure 1-19: Symbol Table Entry: Index 0 1-20Figure 1-20: Relocation Entries 1-21Figure 1-21: Relocatable Fields 1-22Figure 1-22: Relocation Types 1-23Figure 2-1: Program Header 2-2Figure 2-2: Segment Types, p _ t y p e 2-3Figure 2-3: Note Information 2-4Figure 2-4: Example Note Segment 2-5Figure 2-5: Executable File 2-7Figure 2-6: Program Header Segments 2-7Figure 2-7: Process Image Segments 2-8Figure 2-8: Example Shared Object Segment Addresses 2-9Figure 2-9: Dynamic Structure 2-12Figure 2-10: Dynamic Array Tags, d _ t a g 2-12Figure 2-11: Global Offset Table 2-17Figure 2-12: Absolute Procedure Linkage Table 2-17Figure 2-13: Position-Independent Procedure Linkage Table 2-18Figure 2-14: Symbol Hash Table 2-19Figure 2-15: Hashing Function 2-20Figure 3-1: l i b c Contents, Names without Synonyms 3-1Figure 3-2: l i b c Contents, Names with Synonyms 3-1Figure 3-3: l i b c Contents, Global External Data Symbols 3-2Tool Interface Standards (TIS) Portable Formats Specification, Version 1.1 iiiPrefaceELF: Executable and Linking FormatThe Executable and Linking Format was originally developed and published by UNIX System Labora-tories (USL) as part of the Application Binary Interface (ABI). The Tool Interface Standards committee(TIS) has selected the evolving ELF standard as a portable object file format that works on 32-bit IntelArchitecture environments for a variety of operating systems.The ELF standard is intended to streamline software development by providing developers with a set ofbinary interface definitions that extend across multiple operating environments. This should reduce thenumber of different interface implementations, thereby reducing the need for recoding and recompilingcode.About This DocumentThis document is intended for developers who are creating object or executable files on various 32-bitenvironment operating systems. It is divided into the following three parts:Part 1, ‘‘Object Files’’ describes the ELF object file format for the three main types of object files.Part 2, ‘‘Program Loading and Dynamic Linking’’ describes the object file information and systemactions that create running programs.Part 3, ‘‘C Library’’ lists the symbols contained in l i b s y s, the standard ANSI C and l i b c routines,and the global data symbols required by the l i b c routines.NOTEReferences to X86 architecture have been changed to Intel Architecture.Tool Interface Standards (TIS) Portable Formats Specification, Version 1.1 11OBJECT FILESIntroduction 1-1File Format 1-1Data Representation 1-2ELF Header 1-3ELF Identification 1-5Machine Information 1-7Sections 1-8Special Sections 1-13String Table 1-16Symbol Table 1-17Symbol Values 1-20Relocation 1-21Relocation Types 1-22Tool Interface Standards (TIS) Portable Formats Specification, Version 1.1 iIntroductionPart 1 describes the iABI object file format, called ELF (Executable and Linking Format). There are threemain types of object files.A relocatable file holds code and data suitable for linking with other object files to create an execut-able or a shared object file.An executable file holds a program suitable for execution; the file specifies how e x e c(BA_OS) createsa program’s process image.A shared object file holds code and data suitable for linking in two contexts. First, the link editor [seel d(SD_CMD)] may process it with other relocatable and shared object files to create another objectfile. Second, the dynamic linker combines it with an executable file and other shared objects tocreate a process image.Created by the assembler and link editor, object files are binary representations of programs intended toexecute directly on a processor. Programs that require other abstract machines, such as shell scripts, areexcluded.After the introductory material, Part 1 focuses on the file format and how it pertains to building pro-grams. Part 2 also describes parts of the object file, concentrating on the information necessary to executea program.File FormatObject files participate in program linking (building a program) and program execution (running a pro-gram). For convenience and efficiency, the object file format provides parallel views of a file’s contents,reflecting the differing needs of these activities. Figure 1-1 shows an object file’s organization.Figure 1-1: Object File FormatLinking View Execution View_ _____________________ _ ______________________ELF header ELF header_ _____________________ _ ______________________Program header table Program header tableoptional_ _____________________ _ ______________________Section 1_ _____________________. . .Segment 1_ _____________________ _ ______________________Section n_ _____________________. . .Segment 2_ _____________________ _ ______________________. . . . . ._ _____________________ _ ______________________Section header table Section header tableoptional_ _____________________ _ ______________________ An ELF


View Full Document

USF CS 635 - Executable and Linkable Format

Download Executable and Linkable Format
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Executable and Linkable Format and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Executable and Linkable Format 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?