二进制库

发布于 2024-08-10 23:18:34 字数 45 浏览 0 评论 0原文

什么是二进制库?如何生成统计链接到库的二进制文件?库和二进制文件有什么区别?

What are binary libraries? How to generate statistically linked binaries to libraries? What is the difference between libraries and binaries?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

黯然 2024-08-17 23:18:34
  • 二进制文件是至少包含一些由不代表纯文本(即人类可读字符)的位序列组成的数据的文件,即不旨在通过通用字符集(例如 ASCII)进行解释。位(二进制数字一词的缩写)是计算和通信中最基本的信息单位,每个位都有一个值 0 或 1。二进制文件包括图像文件、声音文件、可执行(即,可运行)程序和压缩数据文件。
    通常由链接器完成。

  • 在计算机科学中,是用于开发软件的子例程或类的集合。库包含为独立程序提供服务的代码和数据。这允许以模块化方式共享和更改代码和数据。有些可执行文件既是独立程序又是库,但大多数库不是可执行文件。可执行文件和库通过称为链接的过程相互引用(称为链接),该过程通常由链接器完成。

    • 静态库,也称为存档,由一组例程组成,这些例程由编译器、链接器或绑定器复制到目标应用程序中,生成目标文件和库-单独的可执行文件。此过程以及独立的可执行文件称为目标应用程序的静态构建。跳转和其他例程调用的实际地址以相对或符号形式存储,只有在为所有代码和库分配最终静态地址后才能解析。

    • 除了识别静态和动态加载之外,计算机科学家还经常根据程序之间共享的方式对库进行分类。 动态库几乎总是提供某种形式的共享,允许多个程序同时使用同一个库。根据定义,静态库不能共享。术语“链接器”来自复制过程或子例程的过程,这些过程或子例程可能来自“可重定位”库,并将机器地址调整或“链接”到每个模块的最终位置。

网上已经有各种定义。只需尝试根据您使用的语言搜索一些定义即可。

  • A binary file is any file that contains at least some data consisting of sequences of bits that do not represent plain text (i.e., human-readable characters), i.e., data that is not meant to be interpreted through a common character set (such as ASCII). A bit (a contraction of the term binary digit) is the most basic unit of information in computing and communications, and every bit has a value of either zero or one. Binary files include image files, sound files, executable (i.e., runnable) programs and compressed data files.
    typically done by a linker.

  • In computer science, a library is a collection of subroutines or classes used to develop software. Libraries contain code and data that provide services to independent programs. This allows the sharing and changing of code and data in a modular fashion. Some executables are both standalone programs and libraries, but most libraries are not executables. Executables and libraries make references known as links to each other through the process known as linking, which is typically done by a linker.

    • static library, also known as an archive, consists of a set of routines which are copied into a target application by the compiler, linker, or binder, producing object files and a stand-alone executable file. This process, and the stand-alone executable file, are known as a static build of the target application. Actual addresses for jumps and other routine calls are stored in a relative or symbolic form which cannot be resolved until all code and libraries are assigned final static addresses.

    • In addition to identifying static and dynamic loading, computer scientists also often classify libraries according to how they are shared among programs. Dynamic libraries almost always offer some form of sharing, allowing the same library to be used by multiple programs at the same time. Static libraries, by definition, cannot be shared. The term "linker" comes from the process of copying procedures or subroutines which may come from "relocatable" libraries and adjusting or "linking" the machine address to the final locations of each module.

Various definitions have been done on the web. Just try to search some definitions according the language you use.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文