漫谈兼容内核之八elf映像的装入一-seebugpaper.doc

漫谈兼容内核之八elf映像的装入一-seebugpaper.doc

  1. 1、本文档共42页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
漫谈兼容内核之八elf映像的装入一-seebugpaper

漫谈兼容内核之八 : Talk compatible with the kernel of the eight: ELF 映像的装入 ( 一 )ELF image into (a) 毛德操 Maud operation 上一篇漫谈中介绍了 Wine 的二进制映像装入和启动,现在我们来看看 ELF 映像的装入和启动。 Talk on the one described in the Wine and start loading the binary image, and now we look into the ELF image and start. 一般而言,应用软件的编程不可能是“一竿子到底”、所有的代码都自己写的,程序员不可避免地、也许是不自觉地、都会使用一些现成的程序库。 Generally speaking, application software programming can not be a pole in the end, all write their own code, programmers inevitably, perhaps unconsciously, will use some ready-made library. 对于 C 语言的编程,至少 C 程序库是一定会用到的。 For the C programming language, at least C library would definitely be used. 从编译 / 连接和运行的角度看,应用程序和库程序的连接有两种方法。 From the compile / link and run the point of view, applications, and database connectivity programs in two ways. 一种是固定的、静态的连接,就是把需要用到的库函数的目标 ( 二进制 ) 代码从程序库中抽取出来,连接进应用软件的目标映像中,或者甚至干脆把整个程序库都连接进应用软件的映像中。 One is fixed, static connections, is the need to use the library function of the target (binary) code extracted from the program library, connect the target image into the application software, or even simply to enter the library are connected application image. 这里所谓的连接包括两方面的操作,一是把库函数的目标代码“定位”在应用软件目标映像中的某个位置上。 Here the so-called connection consists of two aspects of the operation, one goal of the library function code positioning in the application software to a target location in the image. 由于不同应用软件本身的大小和结构都可能不同,库函数在目标映像中的位置是无法预先确定的。 Because different applications have their own size and structure may be different, the librarys position in the target image can not be predetermined. 为此,程序库中的代码必须是可以浮动的,即“与位置无关”的,在编译时必须加上 -fPIC 选项,这里 PIC 是“ Position-Independent Code ”的缩写。 To this end, the library code must be floating, that is position independent, and must be compiled with-fPIC option, where the PIC is the Position-Independent Code acronym. 一旦一个库函数在映像中的位置确定以后,就要使应用软件中所有对此函数的调用都指向这个函数。 Once a library function to determine the location in the image after the application software will make all the calls to thi

您可能关注的文档

文档评论(0)

zhaoxiaoj + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档