What's going on in __libc_start_main?

前端 未结 1 725
说谎
说谎 2021-02-02 09:16

I\'m really trying to understand the steps from high level code -> executable.. but am having some difficulties.

I\'ve written an empty int main() {} C fil

相关标签:
1条回答
  • 2021-02-02 09:57

    The first block, ending in "@plt", is the procedure linkage table (https://stackoverflow.com/a/5469334/994153). The jmp *0x8049658 is an indirect branch instruction, so it actually is jumping to __libc_start_main wherever it actually ends up getting loaded in RAM at runtime.

    The real RAM address of __libc_start_main is found in the DYNAMIC RELOCATION RECORDS table, which is created in RAM by the dynamic loader when the program is loaded.

    0 讨论(0)
提交回复
热议问题