精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>嵌入式开发>>操作系统设计与实现>>翻译计划—《写你自己的操作系统》>>TEST翻译计划:《写你自己的操作系统》(可执行文件类型)

主题:TEST翻译计划:《写你自己的操作系统》(可执行文件类型)
发信人: zelor(东村遗少张作乐)
整理人: wenbobo(2003-01-09 10:07:24), 站内信件
Executable File Types
可执行文件类型
 
The number of different executable file types is as many and varied as 

the number of different image and sound file formats. Every Operating 

System seems to have several executable file types unique to itself. 
This part of the FAQ will give a brief rundown on the various types you 

will come across. 
可执行文件类型的丰富性和多样性几乎可与图像和声音文件格式相媲美。每一种

操作系统看来都有几种其独有的可执行文件类型。这部分FAQ将对这些丰富的类型

给予你一个简洁的纲要。

A quick intro to a few terms, 
TEXT is the actual exectuable code area, 
DATA is "initialised" data, 
BSS is "un-initialised" data. 
一些约定的简介:
TEXT 表示实际可执行代码区域(代码段);
DATA 表示“已初始化的”数据;
BSS 表示“未初始化的”数据; 

------------------------------------------------------------
 

Execs :: EXE (dos "MZ") 
Execs :: EXE (dos 中的"MZ"格式)

The most well documented of the executable file formats, the DOS-MZ was 

introduced with MS-DOS (not dos v1 tho) as a companion to the 

simplified DOS-COM file format. 
在大部分关于可执行文件格式的文档中,DOS-MZ格式随MS-DOS被介绍(尽管不是

从第一版DOS开始出现),它被看作是简单的DOS-COM格式的伴侣与补充。

The DOS-MZ was designed to be run in real mode and reflects this, 

having a relocation table of SEGMENT:OFFSET pairings. A very simple 

format that can be run at any offset, it does not distinguish between 

TEXT, DATA and BSS.
DOS-MZ被设计为运行在实模式之下并反映了实模式,其拥有一个SEGMENT:OFFSET

格式的重定位表。这种非常简单的格式能够在任何偏移地址处开始运行,它不区

分TEXT,DATA和BSS。 

Since it was designed to run in real mode, its maximum filesize of 

code+data+bss is 1mb in size. 
由于其被设计成在实模式下运行,它的最大文件长度(code+data+bss)是1MB。

Operating Systems that use it :: DOS, Win*, Linux DOS Emu, Amiga DOS 

Emu
运行平台:DOS,WIN*,LINUX的DOS模拟器,Amiga的DOS模拟器。 
 
------------------------------------------------------------
 


Execs :: EXE (Win 3.xx "NE") 
Execs :: EXE (Win 3.xx 的"NE"格式)

The WIN-NE executable formated designed for Windows 3.x was the "NE" 

New-Executable. Again, a 16bit format, it alleviated the maximum size 

restrictions that the DOS-MZ had.
WIN-NE格式被设计为运行在Windows 3.x下——“NE”即New-Executable之意。它

是一种16位格式,能够降低DOS-MZ的最大长度限制。
 
Operating Systems that use it :: Windows 3.xx
运行平台:Windows 3.xx 
 
------------------------------------------------------

 

Execs :: EXE (OS/2 "LE")
Execs :: EXE (OS/2 的"LE"格式) 
The "LE" Linear Executable format was designed for IBM's OS/2 operating 

system by Microsoft. Supporting both 16 and 32bit segments. 
“LE”-Linear Executable(线性可执行)格式系MS为IBM OS/2操作系统设计。

支持16位和32位段。

fill out more...
待扩充……

Operating Systems that use it :: OS/2, Watcom Compiler/Extender (DOS) 
运行平台:OS/2,DOS下的WATCOM 编译器扩展也支持该格式。 

------------------------------------------------------------
 

Execs :: EXE (Win 9x/NT "PE") 
Execs :: EXE (Win 9x/NT 的"PE"格式)
 
With Windows 95/NT a new exectuable file type was required, thus was 

born the "PE" Portable Executable. Unlike its predecessors, the WIN-PE 

was a true 32bit file format, supporting relocatable code. It does 

distinguish between TEXT, DATA, BSS. 
Windows 95/NT需要一种新的可执行文件类型,因此“PE”格式——Portable 

Executable(可移植可执行)诞生了。 不像它的前几种格式,WIN-PE是完全32位

的文件格式,支持重定位代码,区分TEXT,DATA,BSS。

fill out more...
待扩充……

It is infact, a bastardised version of the COFF format.
实际上,可以将PE视为COFF格式的“私生子”。(:P)

Operating Systems that use it :: Windows 95/98/NT
使用平台:Windows 95/98/NT 
 
--------------------------------------------------------------
 

Execs :: ELF
Execs :: ELF
 
The ELF, Executable Linkable Format was designed by SUN for use in 

their Unix clone. A very versatile file format, it was later picked up 

by many other operating systems for use as both executable files and as 

shared library files.
ELF,Executable Linkable Format(可执行可连接格式)由SUN设计使用在他们

的UNIX CLONE上。这个文件格式很versatile(谁帮我解释一下versatile的准确

含义?),因此后来ELF被许多OS使用,包括可执行文件和共享库文件。
 
fill out more...
待扩充……

It does distinguish between TEXT, DATA and BSS.
区分TEXT,DATA与BSS。 

----------------------------------------------------------------
 

Execs :: COFF 
 
---------------------------------------------------------------
 

Execs :: AOUT 
 



----
生活,就是理想加泡面。
                    ——张作乐,送你一束玫瑰   
        

[关闭][返回]