⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 v1-v2.txt

📁 开源的nasm编译器源码,研究编译器原理很有帮且
💻 TXT
字号:
Differences between RDOFF versions 1 & 2========================================This document is designed primarily for people maintaining code whichuses RDOFF version 1, and would like to upgrade that code to workwith version 2.The main changes are summarised here:Overall format==============The overall format has changed somewhat since version 1, in orderto make RDOFF more flexible. After the file type identifier (whichhas been changed to 'RDOFF2', obviously), there is now a 4 byteinteger describing the length of the object module. This allowsmultiple objects to be concatenated, while the loader can easilybuild an index of the locations of each object. This isn't aspointless as it sounds; I'm using RDOFF in a microkernel operatingsystem, and this is the ideal way of loading multiple driver modulesat boot time.There are also no longer a fixed number of segments; instead thereis a list of segments, immediately following the header.Each segment is preceded by a 10 byte header giving information aboutthat segment. This header has the following format:Length	Description2	Type2	Number2	Reserved4	Length'Type' is a number describing what sort of segment it is (eg text, data,comment, debug info). See 'rdoff2.txt' for a list of the segment types.'Number' is the number used to refer to the segment in the header records.Not all segments will be loaded; it is only intended that one codeand one data segment will be loaded into memory. It is possible, however,for a loaded segment to contain a reference to an unloaded segment.This is an error, and should be flagged at load time. Or maybe you shouldload the segment... its up to you, really.The segment's data immediately follows the end of the segment header.HEADER RECORDS==============All of the header records have changed in this version, but notsubstantially. Each record type has had a content-length code added,a single byte immediately following the type byte. This contains thelength of the rest of the record (excluding the type and length bytes,but including the terminating nulls on any strings in the record).There are two new record types, Segment Relocation (6), and FAR import (7).The record formats are identical to Relocation (1) and import (2). They areonly of real use on systems using segmented architectures. Systems usinga flat model should treat FAR import (7) exactly the same as an import (2),and should either flag segment relocation as an error, or attempt to figureout whether it is a reference to a code or data symbol, and set the valuereferenced to the according selector value. I am opting for the formerapproach, and would recommend that others working on 32 bit flat systemsdo the same.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -