
Tool Interface Standard (TIS) Portable Formats Specification Version 1.1 TIS Committee October 1993 The TIS Committee grants you a non-exclusive, worldwide, royalty-free license to use the information disclosed in the Specifications to make your software TIS-compliant; no other license, express or implied, is granted or intended hereby. The TIS Committee makes no warranty for the use of these standards. THE TIS COMMITTEE SPECIFICALLY DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, AND ALL LIABILITY, INCLUDING CONSEQUENTIAL AND OTHER INDIRECT DAMAGES, FOR THE USE OF THE SPECIFICATIONS AND THE INFORMATION CONTAINED IN IT, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PROPRIETARY RIGHTS. THE TIS COMMITTEE DOES NOT ASSUME ANY RESPONSIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THE SPECIFICATIONS, NOR ANY RESPONSIBILITY TO UPDATE THE INFORMATION CONTAINED IN THEM. The TIS Committee retains the right to make changes to these specifications at any time without notice. Intel is a registered trademark and i386 and Intel386 are trademarks of Intel Corporation and may be used only to identify Intel products. Microsoft, Microsoft C, MS, MS-DOS, and XENIX are registered trademarks and Windows is a trademark of Microsoft Corporation. IBM is a registered trademark and OS/2 is a trademark of International Business Machines Corporation. Phoenix is a registered trademark of Phoenix Technologies, Ltd. UNIX is a registered trademark of UNIX System Laboratories, Inc. in the U.S.A. and other countries. All other brand and product names are trademarks or registered trademarks of their respective holders. Additional copies of this manual can be obtained from: Intel Corporation Literature Center P.O. Box 7641 Mt. Prospect, IL 60056-7641 Or call: 1-800-548-4725 Refer to Intel Order Number 241597. Introduction This Tool Interface Standards Portable Formats Specification, Version 1.1 is the result of the work of the TIS Committee--an association of members of the microcomputer industry formed to work toward standardization of the software interfaces visible to development tools for 32-bit Intel Architecture operating environments. Such interfaces include object module formats, executable file formats, and debug record information and formats. The goal of the committee is to help streamline the software development process throughout the microcomputer industry, currently concentrating on 32-bit operating environments. To that end, the committee has developed two specifications--one for file formats that are portable across leading industry operating systems, and another describing formats for 32-bit Windows operating systems. These specifications will allow software developers to standardize on a set of binary interface definitions that extend across multiple operating environments and reduce the number of different interface implementations that currently must be considered in any single environment. This should permit developers to spend their time innovating and adding value instead of recoding or recompiling for yet another tool interface format. TIS Committee members include representatives from Borland International Corporation, IBM Corporation, Intel Corporation, Lotus Corporation, MetaWare Corporation, Microsoft Corporation, The Santa Cruz Operation, and WATCOM International Coroporation. PharLap Software Incorporated and Symantec Corporation also participated in the specification definition efforts. TIS Portable Formats Specification, Version 1.1 and TIS Formats Specification for Windows, Version 1.0 are the latest deliverables of the TIS Committee. They are based on existing, proven formats in keeping with the TIS Committee's goal to adopt, and when necessary, extend existing standards rather than invent new ones. Within this Portable Formats specification are definitions for loadable, linkable, and debug formats, as listed in the following table. These tool interface standards will enhance the delivery of applications software for the 32-bit Windows, OS/2 and UNIX® operating system environments, as well as for future systems. Tool Interface Type Tool Interface Format Industry Source Loadable and ELF (Executable and UNIX Systems Laboratories and Linkable Linkable Format) UNIX International ABICC Debug DWARF (Debug With UNIX International Arbitrary Record Format) Linkable OMF (Relocatable Object IBM Corporation, Intel Corporation, Module Format) Microsoft Corporation, and PharLap Software Incorporated These, in conjunction with the Windows 32-bit formats, represent the tool interfaces currently agreed upon by TIS Committee members as TIS standards. In the future, the Committee expects to work on standardization efforts for tool interfaces in other areas that will benefit the microcomputer software industry, such as dump file formats, object mapping, and 64-bit operating environments. Tool Interface Standards (TIS) Portable Formats Specification i Version 1.1 Table of Contents I. Executable and Linkable Format (ELF) II. DWARF Debugging Information Format III. Relocatable Object Format Module (OMF) Tool Interface Standards (TIS) Portable Formats Specification iii Version 1.1 I Executable and Linkable Format (ELF) Portions of the ELF specification copyright UNIX Systems Laboratories, Inc. TIS Portable Formats Specification, Version 1.1 ELF: Executable and Linkable Format This document describes the Tool Interface Standards (TIS) portable object file format standard, ELF (Executable and Linkable Format). The original format specification was made available by USL (UNIX System Laboratories) as part of the ABI (Application Binary Interface). A committee in UNIX International, called the ABICC (ABI Coordinating Committee), approved this format specification for UNIX System V. The TIS Committee formed an object format subcommittee to evaluate the widely available formats and to select one as the TIS standard. After studying many different formats, the committee concluded that ELF can be easily adopted across numerous 32-bit Intel Architecture environments and is therefore the best standard for a portable linkable and loadable format. Some of the major reasons for selecting this format are the public nature of the specification and the fact that the PLSIG and ABICC standardization committees can enhance its formats. The PLSIG (Programming Language Special Interest Group) committee is able to propose modifications to the format for approval by the ABICC. Once the ABICC approves a modification, the specifications are enhanced accordingly. The TIS Committee intends to work through PLSIG to address issues of interest, such as compression, resource management, and future 64-bit architectures. The TIS Committee created this ELF document by extracting the executable and linkable format information from the System V Application Binary Interface and the System V Application Binary Interface Intel 386 Processor Supplement published by Prentice Hall (UNIX Press). This document is unchanged and is the same document that was released in TIS Portable Formats Specification, Version 1.0. I Executable and Linkable Format (ELF) Contents Preface OBJECT FILES 1 Introduction 1-1 ELF Header 1-3 Sections 1-8 String Table 1-16 Symbol Table 1-17 Relocation 1-21 PROGRAM LOADING AND DYNAMIC LINKING 2 Introduction 2-1 Program Header 2-2 Program Loading 2-7 Dynamic Linking 2-10 C LIBRARY 3 C Library 3-1 Index I Index I-1 Tool Interface Standards (TIS) Portable Formats Speci®cation, Version 1.1 i ELF: Executable and Linkable Format ii Portable Formats Speci®cation, Version 1.1 Tool Interface Standards (TIS) Figures and Tables Figure 1-1: Object File Format 1-1 Figure 1-2: 32-Bit Data Types 1-2 Figure 1-3: ELF Header 1-3 Figure 1-4: e_ i d e n t [ ] Identi®cation Indexes 1-5 Figure 1-5: Data Encoding EL F D A T A 2 L S B 1-6 Figure 1-6: Data Encoding EL F D A T A 2 M S B 1-6 Figure 1-7: 32-bit Intel Architecture Identi®cation, e_ i d e n t 1-7 Figure 1-8: Special Section Indexes 1-8 Figure 1-9: Section Header 1-9 Figure 1-10: Section Types, sh _ t y p e 1-10 Figure 1-11: Section Header Table Entry: Index 0 1-11 Figure 1-12: Section Attribute Flags, sh _ f l a g s 1-12 Figure 1-13: sh _ l i n k and sh _ i n f o Interpretation 1-13 Figure 1-14: Special Sections 1-13 Figure 1-15: String Table Indexes 1-16 Figure 1-16: Symbol Table Entry 1-17 Figure 1-17: Symbol Binding, EL F 3 2 _ S T _ B I N D 1-18 Figure 1-18: Symbol Types, EL F 3 2 _ S T _ T Y P E 1-19 Figure 1-19: Symbol Table Entry: Index 0 1-20 Figure 1-20: Relocation Entries 1-21 Figure 1-21: Relocatable Fields 1-22 Figure 1-22: Relocation Types 1-23 Figure 2-1: Program Header 2-2 Figure 2-2: Segment Types, p_ t y p e 2-3 Figure 2-3: Note Information 2-4 Figure 2-4: Example Note Segment 2-5 Figure 2-5: Executable File 2-7 Figure 2-6: Program Header Segments 2-7 Figure 2-7: Process Image Segments 2-8 Figure 2-8: Example Shared Object Segment Addresses 2-9 Figure 2-9: Dynamic Structure 2-12 Figure 2-10: Dynamic Array Tags, d_ t a g 2-12 Figure 2-11: Global Offset Table 2-17 Figure 2-12: Absolute Procedure Linkage Table 2-17 Figure 2-13: Position-Independent Procedure Linkage Table 2-18 Figure 2-14: Symbol Hash Table 2-19 Figure 2-15: Hashing Function 2-20 Figure 3-1: li b c Contents, Names without Synonyms 3-1 Figure 3-2: li b c Contents, Names with Synonyms 3-1 Figure 3-3: li b c Contents, Global External Data Symbols 3-2 Tool Interface Standards (TIS) Portable Formats Speci®cation, Version 1.1 iii Preface ELF: Executable and Linking Format The 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 ®le format that works on 32-bit Intel Architecture environments for a variety of operating systems.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages262 Page
-
File Size-