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.
我正在寻找一篇“人类可读”的文章,该文章通过示例描述了从源代码(例如C)到可执行程序的过渡。理想情况下,文章应包含有关目标文件格式的描述,代码的不同部分如何映射到目标文件的格式et.al.该假设文章还将解释链接器如何使用多个目标文件,如何使用不同的ELF实体,从而生成准备执行的文件。而且,比方说,如果目标文件引用外部库,该怎么办?它应该具有高级/中级C / C ++知识。
I'd be interested to know if such an article/book/blog is known to mankind.
我很想知道人类是否知道这样的文章/书籍/博客。
Thanks
:J
4 个解决方案
#1
- Introduction to C Programming
- How C Programming Works
- University of Leicester: Intro to C Programming
C编程简介
C编程如何工作
莱斯特大学:C编程简介
Google "C-Programming Tutorial" for more.
谷歌“C编程教程”了解更多。
#2
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.
你还可以查看Alfred V. Aho,Ravi Sethi和Jeffrey D. Ullman撰写的“龙书”编纂者:原理,技巧和工具,如果你想深入了解的话。
#3
Unfortunately I don't know about such an article but GNU linker manual could answer some of your questions.
不幸的是我不知道这样的文章,但GNU链接器手册可以回答你的一些问题。
#4
"Linkers and loaders" by John R. Levine is quite good.
John R. Levine的“连接器和装载器”非常好。
连接器和装载机
#1
- Introduction to C Programming
- How C Programming Works
- University of Leicester: Intro to C Programming
C编程简介
C编程如何工作
莱斯特大学:C编程简介
Google "C-Programming Tutorial" for more.
谷歌“C编程教程”了解更多。
#2
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.
你还可以查看Alfred V. Aho,Ravi Sethi和Jeffrey D. Ullman撰写的“龙书”编纂者:原理,技巧和工具,如果你想深入了解的话。
#3
Unfortunately I don't know about such an article but GNU linker manual could answer some of your questions.
不幸的是我不知道这样的文章,但GNU链接器手册可以回答你的一些问题。
#4
"Linkers and loaders" by John R. Levine is quite good.
John R. Levine的“连接器和装载器”非常好。
连接器和装载机