链接器文件中输入部分和输出部分之间的区别? [英] Difference between input and output sections in a linkerfile?

查看:202
本文介绍了链接器文件中输入部分和输出部分之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然在生成的二进制文件或ELF文件的上下文中可以清楚地知道什么是节,但是文档中的许多位置(与所使用的编译器无关)将它们称为Input或Output节.

While it could be clear in the context of a resulting binary or ELF file what is a section, many places in documentation (independently of the compiler used) refers them as to Input or Output sections.

两者之间有什么区别?

推荐答案

链接器使用目标文件(可能还有共享库)并输出 可执行文件或共享库.输入对象文件由命名 部分-.text.data.rodata.bss等.输出文件也是如此.

The linker consumes object files (and possibly shared libraries) and outputs an executable or shared library. The input object files are composed of named sections - .text, .data, .rodata, .bss, etc. So is the output file.

它 是链接器工作的主要部分,用于合并以下所有 input 部分 来自所有输入目标文件的相同名称,进入单个 output 部分 输出文件中该名称的名称.例如.输入的所有.text部分 目标文件在输出文件的.text部分中起作用.

It is a principal part of the linker's job to combine all the input sections of the same name, from all of the input object files, into a single output section of that name in the output file. E.g. all of the .text sections of the input object files contribute to the .text section of the output file.

如果链接器确定某些输入节是多余的,则它们可能会从输出文件中丢弃.

Some input sections may discarded from the output file if the linker determines they are redundant.

这篇关于链接器文件中输入部分和输出部分之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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