编译链接: object code 与 machine code 有啥区别

object code与machine code完全一样,本身就可以当machine code用啦。但是包含object code的文件(.o文件)不能直接运行,因为.o文件里面缺少运行的各种库。linker(链接过程)的工作就是在.o文件里面加上以机器码表示的各种静态库,从而使该文件能够独立运行。仅此而已!plus:一些库在link的时候没有加,但是会在最后的运行文件的时候自己临时加上去,也不会影响文件的运行。大概就是这样,具体可以去参考Randal E.Bryant 的《Computer System》这本书的第三章,那里会有很详细的说明
■网友
object code是编译器产生的,编译原理里面有说,在高级语言到低级语言的中间形式就是object code。外文解释:
The code produced by a compiler. Programmers write programs in a form called source code. The source code consists of instructions in a particular language, like C or FORTRAN. Computers, however, can only executeinstructions written in a low-level language called machine language.To get from source code to machine language, the programs must be transformed by a compiler. The compiler produces an intermediary form called object code. Object code is often the same as or similar to a computer\u0026#39;s machine language. The final step in producing an executable program is to transform the object code into machine language, if it is not already in this form. This can be done by a number of different types of programs, called assemblers, binders,linkers, and loaders.
【编译链接: object code 与 machine code 有啥区别】 参考网站What is object code? Webopedia Definition
推荐阅读
- hadoop中的mapreduce链接(mapreduce chaining)怎样避免中间文件的产生
- 安卓系统微信朋友圈里有看到朋友发的VR链接,为啥不能分屏,苹果手机却可以
- 外交谈判|
- 既然c程序编译为机器码直接操作硬件,为啥不同操作系统下需要重新编译
- 目前,hao123 和 360 安全导航这两个导航网站哪个用户使用量多我能监测到自身网站的流量来自于这两家的首页,但这两家网站首页并没有我们网站的链接,
- 请教智能合约编译的问题
- 制约编译速度的主要原因是啥
- 『机场』硕放机场首个异地货站落户昆山 实现货源地和机场无缝链接
- 怎样用0和1写一段代码,具体怎样编译运行
- 怎样看待许多《编译原理》、《操作系统》教材里,没有编译器、操作系统demo(连一个模拟的,也没有)
