main函数之前发生了什么

    xiaoxiao2021-03-25  148

    写在前面

    这篇文章通过gdb来跟踪一下main函数之前,CRT(C runtime)帮我们做了哪些事情。具体的调试环境搭建可以参考我的另一篇博文《源码级调试glibc》。

    参考链接:

    《Linux x86 Program Start Up》

    《The thorny path of Hello World》

    《Before Main()》(需梯子)

    《Life Cycle of a Linux Program | Glenn's Web Site》

    《main 之前与之后》

    《《程序员的自我修养》第十一章读书笔记》

    《How main() is executed on Linux 》

    《Building executables with GNU linker》

    《How statically linked programs run on Linux》

    《How is a binary executable organized? Let's explore it!》

    《main函数和启动例程》

    《Dynamic Linker 實驗》

    《linux编程之main()函数启动过程》

    《我的经验书 之 Linux动态链接器的实现》

    《shared library怎样实现对象的单一定义原则》

    《canary分析》

    《The ELF Virus Writing HOWTO》

    《100个gdb小技巧》

    《linux inside -- linker》

    《运行库到底做了什么?》

    《main之前 》

    《Linux Programe/Dynamic Shared Library Entry/Exit Point Glibc Entry Point/Function》

    《链接脚本在编程中的高级运用之二——运行时库和C++特性支持》

    《Linux x86 elf 程序启动过程》

     

    引申话题:

    exit函数

    C++构造和析构函数

    __cxa_atexit()

    转载请注明原文地址: https://ju.6miu.com/read-10613.html

    最新回复(0)