文章/书籍:从源代码到可执行程序?

发布于 2024-07-25 03:06:38 字数 257 浏览 5 评论 0原文

我正在寻找一篇“人类可读”的文章,如果可能的话,用示例描述从源代码(例如 C)到可执行程序的转换。 理想情况下,本文应包含有关目标文件格式、代码的不同部分如何映射到目标文件等的描述。 这篇假设的文章还将解释链接器如何使用多个目标文件,如何使用不同的 ELF 实体,从而生成准备执行的文件。 另外,如果目标文件引用外部库怎么办? 它应假定具有高级/中级 C/C++ 知识。

我很想知道人类是否知道这样的文章/书籍/博客。

谢谢
:J

I'm looking for a "human readable" article which describes, with examples, if possible, the transition from source code, say C, to an executable program. Ideally, the article shall contain descriptions about the object file format, how different sections of the code maps to to that of object files et.al. That hypothetical article would also explain how the linker uses more than one object file, how it makes use of different ELF entities and thus produces the ready-to-execute file. And also, say, what if the object file refers to external libraries. It shall assume an advanced/medium-level C/C++ knowledge.

I'd be interested to know if such an article/book/blog is known to mankind.

Thanks
:J

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

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

发布评论

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

评论(4

等风来 2024-08-01 03:06:38

如果您想深入了解,还可以查看 Alfred V. Aho、Ravi Sethi 和 Jeffrey D. Ullman 撰写的“龙书”编译器:原理、技术和工具

You could also check out the "dragon book" Compilers: Principles, Techniques, and Tools by Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman if you want to get super in-depth.

独行侠 2024-08-01 03:06:38

不幸的是我不知道这样的文章,但 GNU 链接器手册 可以回答您的一些问题。

Unfortunately I don't know about such an article but GNU linker manual could answer some of your questions.

暮光沉寂 2024-08-01 03:06:38

John R. Levine 的《链接器和加载器》相当不错。

链接器和加载器

"Linkers and loaders" by John R. Levine is quite good.

Linkers and Loaders

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