文件名称:
Executable and Linkable Format (ELF)
开发工具:
文件大小: 201kb
下载次数: 0
上传时间: 2019-07-28
详细说明:elf文件格式说明文档,英文
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-1Portable Formats Specification, Version 1.1
Tool Interface Stand ards(TIs)
Tool Interface Standards(TIS)
Portable Formats
Sipation, Version 1.1
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 file format that works on 32-bit Intel
Architecture environments for a variety of operating systems
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
d
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 thrce 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
the standard ANSi C and
routines,
and the global data symbo ls required by the
routines
Tool Interface Standards(TIS
Portable Formats Specification, Version 1.1
Tool Interface Standards(TIS)
Portable Formats Specification, Version 1.1
Part 1 describes the iABl object file format, called ELF (Executable and Linking Format). There are three
main 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 exccution; the file specifics how (BA OS)creates
a program s process image
A shared object file holds code and data suitable for linking in two contexts. First, the link editor [see
(SD CMD)] may process it with other relocatable and shared object files to create another object
file. Second, the dynamic linker combines it with an executable file and other shared objects to
create a process image.
Created by the assembler and link editor, object files are binary representations of programs intended to
execute directly on a processor. Programs that require other abstract machines, such as shell scripts, are
excluded
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 execute
a program
Object 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 files contents,
reflecting the differing needs of these activities. Figure 1-1 shows an object files organization
Linking view
ExecutionⅤiew
elF header
EL上 header
Program header table
Program header table
tional
Section 1
egmont 1
ection n
Segment 2
Section header table
Section header table
optional
An elf header resides at the beginning and holds a"road map"describing the file's organization. Sec
tions hold the bulk of object file information for the linking view: instructions, data, symbol table, reloca-
tion information, and so on. Descriptions of special sections appear laterin Part 1. Part 2 discusses seg-
ments and the program execution view of the file
Tool Interface Standards(TIS)
Portable Formats Specification, Version 1.1
A program header table, if present, tells the system how to create a process image. Files used to build a pro
cess image(execute a program)must have a program header table; relocatable files do not need one. 4
section header table contains information describing the files sections. Every section has an entry in the
table; each entry gives information such as the section name, the section size, ctc. Files used during link
ing must have a section header table; other object files may or may not have one
As described here, the object file format supports various processors with 8-bit by tes and 32-bit architec
tures. Nevertheless, it is intended to be extensible to larger(or smaller)architectures. Object files there
fore represent some control data with a machine-independent format, making it possible to identify
object files and interpret their contents in a common way. Remaining data in an object file use the encod
ing of the target processor, regardless of the machine on which the file was created
N
ame
Size Alignment
Purpose
51
ddre
424441
2
Unsigned medium integer
Unsigned file offset
ign
ge integer
Unsigned large integer
Unsigned small integer
All data structures that the object file format defines follow the"natural"size and alignment guidelines
for the relevant class. If necessary, data structures contain explicit padding to ensure 4-byte alignment for
4-byte objects, to force structure sizes to a multiple of 4, etc. Data also have suitable alignment from the
beginning of the file. Thus, for example, a structure containing an
member will be aligne
on a 4-byte boundary within the file
上 or portability reasons上L上 uses no bit- fields.
Portable Formats Specification, Version 1.1
Tool Interface Stand ards(TIs)
Some object file control structures can grow because the elf header contains their actual sizes If the
object file format changes, a program may encounter control structures that are larger or smaller than
expected. Programs might therefore ignore"extra"information. The treatment of missing"informa
tion depends on context and will be specified when and if extensions are defined
The initial bytes mark the file as an object file and provide machine-independent data
below,in"ELF Identification. pret the file s contents. Complete descriptions appear
with which to decode and inte
This member identifies the object file type
Meaning
Relocatab le fil
Executable file
Shared object file
Core file
rocessor-specific
rocessor-specific
Although the core file contents are unspecified, type
is reserved to mark the
file. Values from
hou
(inclusive) are reserved for
processor-specific semantics. Other values are reserved and will be assigned to new
object file types as necessary
Tool Interface Standards(TIS)
Portable Formats Specification, Version 1.1
This member's value specifies the required architecture for an individual file
ame
Value
ning
at&T We 32100
SPARC
Intel 80386
Motorola 68000
Motorola 88000
Intel 80860
MIPS RS3000
Other values are reserved and will be assigned to new machines as necessary
Proc
ific ELF names use the machine
to distinguish them For exampl
the flags mentioned below use the prefix a flag named
for the
chine would be called
This member identifies the object file version
ame
Valt
Meaning
version
Current version
The value signifies the original file format; extensions will create new versions with
higher numbers. The value of
though given as above, will change as
necessary to reflect the current version number
This member gives the virtual address to which the system first transfers control, thus
starting the process. If the file has no associated entry point this member holds zero
This member holds the program header table's file offset in bytes. If the file has no
program header table, this member holds zero
This member holds the section header table's file offset in bytes. If the file has no sec
tion header table. this member holds zero
This member holds processor-specific flags associated with the file. Flag names take
the form machine flag. See" Machine Information for flag definitions
This member holds the elF header's size in bytes
This member holds the size in bytes of one entry in the files program header table, all
entries are the same size
This member holds the number of entries in the program header table. Thus the pro
duct of
d
gives the tables size in bytes. If a file has no pro
gram header table
holds the value zero
This member holds a section headers size in bytes. A section header is one entry in
the section header table all entries are the same size
This member holds the number of entries in the section header table. Thus the product
and
gives the section header tables size in bytes. If a file
has no section header table
holds the value zero
Portable Formats Specification, Version 1.1
Tool Interface Stand ards(TIs)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.