目标code,在C语言中联时间 [英] Object code, linking time in C language

查看:105
本文介绍了目标code,在C语言中联时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编译时,C联时间之前产生目标code。
我不知道如果对象code为二进制的形式吗?
如果是这样,接下来发生的事情在联时间?

When compiling, C produces object code before linking time. I wonder if object code is in the form of binary yet? If so, what happened next in the linking time?

推荐答案

维基百科说:

在计算机科学,对象文件
  命名一个有组织的集合
  对象,并且通常这些对象
  是计算机指令序列
  在一台机器code格式,其可以是
  通过计算机的CPU直接执行。

In computer science, an object file is an organised collection of named objects, and typically these objects are sequences of computer instructions in a machine code format, which may be directly executed by a computer's CPU.

对象文件通常由产生
  编译器为的处理的结果
  来源$ C ​​$ C文件。目标文件包含
  紧凑code和通常被称为
  二进制。

Object files are typically produced by a compiler as a result of processing a source code file. Object files contain compact code, and are often called "binaries".

一个连接通常用于
  生成可执行文件或库
  通过合并对象文件的部分
  一起。目标文件嵌入
  系统通常包含什么,但
  机code,但一般而言,对象
  文件还包含数据,以供使用
  code运行时:搬迁
  信息,栈展开
  资料,评论,程序符号
  (变量和函数的名称)为
  链接和/或调试的目的,
  其他调试信息。

A linker is typically used to generate an executable or library by amalgamating parts of object files together. Object files for embedded systems typically contain nothing but machine code but generally, object files also contain data for use by the code at runtime: relocation information, stack unwinding information, comments, program symbols (names of variables and functions) for linking and/or debugging purposes, and other debugging information.

另一个伟大的网站有更详细的信息和有用的图,这里

Another great site has much more detailed info and a useful diagram, here:

这篇关于目标code,在C语言中联时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆