Executable and Linkable Format (ELF)
Contents
Preface
1 OBJECT FILES
Introduction 1-1
ELF Header 1-3
Sections 1-8
String Table 1-16
Symbol Table 1-17
Relocation 1-21
2 PROGRAM LOADING AND DYNAMIC LINKING
Introduction 2-1
Program Header 2-2
Program Loading 2-7
Dynamic Linking 2-10
3 C LIBRARY
C Library 3-1
I Index
Index I-1
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_ident[ ] Identification Indexes 1-5
Figure 1-5: Data Encoding ELFDATA2LSB 1-6
Figure 1-6: Data Encoding ELFDATA2MSB 1-6
Figure 1-7: 32-bit Intel Architecture Identification, e_ident 1-7
Figure 1-8: Special Section Indexes 1-8
Figure 1-9: Section Header 1-9
Figure 1-10: Section Types, sh_type 1-10
Figure 1-11: Section Header Table Entry: Index 0 1-11
Figure 1-12: Section Attribute Flags, sh_flags 1-12
Figure 1-13: sh_link and sh_info 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, ELF32_ST_BIND 1-18
Figure 1-18: Symbol Types, ELF32_ST_TYPE 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_type 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_tag 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: libc Contents, Names without Synonyms 3-1
Figure 3-2: libc Contents, Names with Synonyms 3-1
Figure 3-3: libc Contents, Global External Data Symbols 3-2
Preface
ELF: Executable and Linking Format
The Executable and Linking Format was originally developed and published by UNIX
System Laboratories (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 Intel
Architecture environments for a variety of operating systems.
(可执行连接格式起初是作为UNIX系统实验室(USL)作为应用程序二进制接口(ABI)的一部分而开发和发布的。工具接口标准委员会(TIS)选择了正在发展中的ELF标准作为
可运行在32位INTEL体系的各种操作系统上的可移植的二进制文件格式。)
The ELF standard is intended to streamline software development by providing
developers with a set of binary interface definitions that extend across
multiple operating environments. This should reduce the number of different
interface implementations, thereby reducing the need for recoding and
recompiling code.
(ELF标准的目的是通过为开发者提供一个可扩展到多种操作系统环境的二进制接口规范,来简化软件的开发工作。减少了不同种类的接口实现的数量,代码的重新编码重新编译的需求也随之而减化。)
About This Document
This document is intended for developers who are creating object or executable
files on various 32-bit environment 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 system actions that create running programs.
Part 3, ‘‘C Library’’ lists the symbols contained in libsys, the standard ANSI C
and libc routines, and the global data symbols required by the libc routines.
(这篇文档是为那些想在各种32位操作系统环境上创建目标文件、可执行文件的开发者们准备的。文档分为以下三个部分:
* 第一部分, “目标文件Object Files”描述了三种主要类型目标文件的ELF目标文件格式。
* 第二部分, “程序加载和动态连接”描述了目标文件的相关信息和在创建运行程序时的系统行为。
* 第三部分, “C 语言库”列出了 libsys中包含的符号, 标准ANSI C 和libc的例程函数,还有libc例程函数所必需的全局数据符号。)
NOTE
References to X86 architecture have been changed to Intel Architecture.
(注意: 参考的X86体系已经被改成了Intel体系。)
String 字符串,一组字符------一组连续的字符在计算机中被作为单一物体
Symbol 符号, 记号, 标号, 象征, 符号用来代表某一操作、要素、数量、质量或某种联系,如在数学或音乐中
1 OBJECT FILES
Introduction 1-1
File Format 1-1
Data Representation 1-2
ELF Header 1-3
ELF Identification 1-5
Machine Information 1-7
Sections 1-8
Special Sections 1-13
如果您对本文有任何疑问或者建议,请到讨论区发表您的意见:
>>
论坛入口 <<
上一篇:
RedHat环境下使用APT在线更新系统
下一篇:
Web服务器日志统计分析完全解决方案
【文章评论】
【收藏本文】
【推荐好友】
【打印本文】
【我要投稿】 【论坛讨论】