{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/example-main-program-text/",
  "atlas": "https://www.pystone.net/?node=example-main-program-text#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/example-main-program-text.md",
  "context": "https://www.pystone.net/notes/example-main-program-text.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:example-main-program-text",
  "slug": "example-main-program-text",
  "title": "示例：main_program_text",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "示例：main program text",
  "contentRole": "unspecified",
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "unspecified",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "58ef500f6589d95c77588f9e5b6621185a71b014df92b649c78c6ebef7f80dd1",
  "assets": [],
  "headings": [
    {
      "depth": 1,
      "text": "示例：mainprogramtext",
      "anchor": "示例mainprogramtext",
      "citation": "https://www.pystone.net/notes/example-main-program-text/#%E7%A4%BA%E4%BE%8Bmainprogramtext"
    }
  ],
  "claims": [],
  "outgoing": [],
  "incoming": [
    {
      "id": "note:programming-languages-and-runtimes",
      "title": "编程语言与运行时",
      "url": "https://www.pystone.net/notes/programming-languages-and-runtimes/",
      "atlas": "https://www.pystone.net/?node=programming-languages-and-runtimes#knowledge-atlas",
      "label": "编程语言与运行时",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "示例：mainprogramtext",
      "citation": "https://www.pystone.net/notes/programming-languages-and-runtimes/#%E6%9C%AC%E5%B1%82"
    }
  ],
  "contentMarkdown": "# 示例：main_program_text\n\n﻿# 示例：main_program_text\n\n```yaml\n\nmain_program:     file format elf64-x86-64\n\n\nDisassembly of section .init:\n\n00000000000005e8 <_init>:\n 5e8:   48 83 ec 08             sub    $0x8,%rsp\n 5ec:   48 8b 05 f5 09 20 00    mov    0x2009f5(%rip),%rax        # 200fe8 <__gmon_start__>\n 5f3:   48 85 c0                test   %rax,%rax\n 5f6:   74 02                   je     5fa <_init+0x12>\n 5f8:   ff d0                   callq  *%rax\n 5fa:   48 83 c4 08             add    $0x8,%rsp\n 5fe:   c3                      retq\n\nDisassembly of section .plt:\n\n0000000000000600 <.plt>:\n 600:   ff 35 b2 09 20 00       pushq  0x2009b2(%rip)        # 200fb8 <_GLOBAL_OFFSET_TABLE_+0x8>\n 606:   ff 25 b4 09 20 00       jmpq   *0x2009b4(%rip)        # 200fc0 <_GLOBAL_OFFSET_TABLE_+0x10>\n 60c:   0f 1f 40 00             nopl   0x0(%rax)\n\n0000000000000610 <add@plt>:\n 610:   ff 25 b2 09 20 00       jmpq   *0x2009b2(%rip)        # 200fc8 <add>\n 616:   68 00 00 00 00          pushq  $0x0\n 61b:   e9 e0 ff ff ff          jmpq   600 <.plt>\n\n0000000000000620 :\n 620:   ff 25 aa 09 20 00       jmpq   *0x2009aa(%rip)        # 200fd0\n 626:   68 01 00 00 00          pushq  $0x1\n 62b:   e9 d0 ff ff ff          jmpq   600 <.plt>\n\nDisassembly of section .plt.got:\n\n0000000000000630 <__cxa_finalize@plt>:\n 630:   ff 25 c2 09 20 00       jmpq   *0x2009c2(%rip)        # 200ff8 <__cxa_finalize@GLIBC_2.2.5>\n 636:   66 90                   xchg   %ax,%ax\n\nDisassembly of section .text:\n\n0000000000000640 <_start>:\n 640:   31 ed                   xor    %ebp,%ebp\n 642:   49 89 d1                mov    %rdx,%r9\n 645:   5e                      pop    %rsi\n 646:   48 89 e2                mov    %rsp,%rdx\n 649:   48 83 e4 f0             and    $0xfffffffffffffff0,%rsp\n 64d:   50                      push   %rax\n 64e:   54                      push   %rsp\n 64f:   4c 8d 05 aa 01 00 00    lea    0x1aa(%rip),%r8        # 800 <__libc_csu_fini>\n 656:   48 8d 0d 33 01 00 00    lea    0x133(%rip),%rcx        # 790 <__libc_csu_init>\n 65d:   48 8d 3d e6 00 00 00    lea    0xe6(%rip),%rdi        # 74a <main>\n 664:   ff 15 76 09 20 00       callq  *0x200976(%rip)        # 200fe0 <__libc_start_main@GLIBC_2.2.5>\n 66a:   f4                      hlt\n 66b:   0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)\n\n0000000000000670 <deregister_tm_clones>:\n 670:   48 8d 3d 99 09 20 00    lea    0x200999(%rip),%rdi        # 201010 <__TMC_END__>\n 677:   55                      push   %rbp\n 678:   48 8d 05 91 09 20 00    lea    0x200991(%rip),%rax        # 201010 <__TMC_END__>\n 67f:   48 39 f8                cmp    %rdi,%rax\n 682:   48 89 e5                mov    %rsp,%rbp\n 685:   74 19                   je     6a0 <deregister_tm_clones+0x30>\n 687:   48 8b 05 4a 09 20 00    mov    0x20094a(%rip),%rax        # 200fd8 <_ITM_deregisterTMCloneTable>\n 68e:   48 85 c0                test   %rax,%rax\n 691:   74 0d                   je     6a0 <deregister_tm_clones+0x30>\n 693:   5d                      pop    %rbp\n 694:   ff e0                   jmpq   *%rax\n 696:   66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)\n 69d:   00 00 00\n 6a0:   5d                      pop    %rbp\n 6a1:   c3                      retq\n 6a2:   0f 1f 40 00             nopl   0x0(%rax)\n 6a6:   66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)\n 6ad:   00 00 00\n\n00000000000006b0 <register_tm_clones>:\n 6b0:   48 8d 3d 59 09 20 00    lea    0x200959(%rip),%rdi        # 201010 <__TMC_END__>\n 6b7:   48 8d 35 52 09 20 00    lea    0x200952(%rip),%rsi        # 201010 <__TMC_END__>\n 6be:   55                      push   %rbp\n 6bf:   48 29 fe                sub    %rdi,%rsi\n 6c2:   48 89 e5                mov    %rsp,%rbp\n 6c5:   48 c1 fe 03             sar    $0x3,%rsi\n 6c9:   48 89 f0                mov    %rsi,%rax\n 6cc:   48 c1 e8 3f             shr    $0x3f,%rax\n 6d0:   48 01 c6                add    %rax,%rsi\n 6d3:   48 d1 fe                sar    %rsi\n 6d6:   74 18                   je     6f0 <register_tm_clones+0x40>\n 6d8:   48 8b 05 11 09 20 00    mov    0x200911(%rip),%rax        # 200ff0 <_ITM_registerTMCloneTable>\n 6df:   48 85 c0                test   %rax,%rax\n 6e2:   74 0c                   je     6f0 <register_tm_clones+0x40>\n 6e4:   5d                      pop    %rbp\n 6e5:   ff e0                   jmpq   *%rax\n 6e7:   66 0f 1f 84 00 00 00    nopw   0x0(%rax,%rax,1)\n 6ee:   00 00\n 6f0:   5d                      pop    %rbp\n 6f1:   c3                      retq\n 6f2:   0f 1f 40 00             nopl   0x0(%rax)\n 6f6:   66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)\n 6fd:   00 00 00\n\n0000000000000700 <__do_global_dtors_aux>:\n 700:   80 3d 09 09 20 00 00    cmpb   $0x0,0x200909(%rip)        # 201010 <__TMC_END__>\n 707:   75 2f                   jne    738 <__do_global_dtors_aux+0x38>\n 709:   48 83 3d e7 08 20 00    cmpq   $0x0,0x2008e7(%rip)        # 200ff8 <__cxa_finalize@GLIBC_2.2.5>\n 710:   00\n 711:   55                      push   %rbp\n 712:   48 89 e5                mov    %rsp,%rbp\n 715:   74 0c                   je     723 <__do_global_dtors_aux+0x23>\n 717:   48 8b 3d ea 08 20 00    mov    0x2008ea(%rip),%rdi        # 201008 <__dso_handle>\n 71e:   e8 0d ff ff ff          callq  630 <__cxa_finalize@plt>\n 723:   e8 48 ff ff ff          callq  670 <deregister_tm_clones>\n 728:   c6 05 e1 08 20 00 01    movb   $0x1,0x2008e1(%rip)        # 201010 <__TMC_END__>\n 72f:   5d                      pop    %rbp\n 730:   c3                      retq\n 731:   0f 1f 80 00 00 00 00    nopl   0x0(%rax)\n 738:   f3 c3                   repz retq\n 73a:   66 0f 1f 44 00 00       nopw   0x0(%rax,%rax,1)\n\n0000000000000740 <frame_dummy>:\n 740:   55                      push   %rbp\n 741:   48 89 e5                mov    %rsp,%rbp\n 744:   5d                      pop    %rbp\n 745:   e9 66 ff ff ff          jmpq   6b0 <register_tm_clones>\n\n000000000000074a <main>:\n 74a:   55                      push   %rbp\n 74b:   48 89 e5                mov    %rsp,%rbp\n 74e:   48 83 ec 10             sub    $0x10,%rsp\n 752:   be 05 00 00 00          mov    $0x5,%esi\n 757:   bf 03 00 00 00          mov    $0x3,%edi\n 75c:   e8 af fe ff ff          callq  610 <add@plt>\n 761:   89 45 fc                mov    %eax,-0x4(%rbp)\n 764:   8b 45 fc                mov    -0x4(%rbp),%eax\n 767:   89 c6                   mov    %eax,%esi\n 769:   48 8d 3d a4 00 00 00    lea    0xa4(%rip),%rdi        # 814 <_IO_stdin_used+0x4>\n 770:   b8 00 00 00 00          mov    $0x0,%eax\n 775:   e8 a6 fe ff ff          callq  620\n 77a:   b8 00 00 00 00          mov    $0x0,%eax\n 77f:   c9                      leaveq\n 780:   c3                      retq\n 781:   66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)\n 788:   00 00 00\n 78b:   0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)\n\n0000000000000790 <__libc_csu_init>:\n 790:   41 57                   push   %r15\n 792:   41 56                   push   %r14\n 794:   49 89 d7                mov    %rdx,%r15\n 797:   41 55                   push   %r13\n 799:   41 54                   push   %r12\n 79b:   4c 8d 25 fe 05 20 00    lea    0x2005fe(%rip),%r12        # 200da0 <__frame_dummy_init_array_entry>\n 7a2:   55                      push   %rbp\n 7a3:   48 8d 2d fe 05 20 00    lea    0x2005fe(%rip),%rbp        # 200da8 <__init_array_end>\n 7aa:   53                      push   %rbx\n 7ab:   41 89 fd                mov    %edi,%r13d\n 7ae:   49 89 f6                mov    %rsi,%r14\n 7b1:   4c 29 e5                sub    %r12,%rbp\n 7b4:   48 83 ec 08             sub    $0x8,%rsp\n 7b8:   48 c1 fd 03             sar    $0x3,%rbp\n 7bc:   e8 27 fe ff ff          callq  5e8 <_init>\n 7c1:   48 85 ed                test   %rbp,%rbp\n 7c4:   74 20                   je     7e6 <__libc_csu_init+0x56>\n 7c6:   31 db                   xor    %ebx,%ebx\n 7c8:   0f 1f 84 00 00 00 00    nopl   0x0(%rax,%rax,1)\n 7cf:   00\n 7d0:   4c 89 fa                mov    %r15,%rdx\n 7d3:   4c 89 f6                mov    %r14,%rsi\n 7d6:   44 89 ef                mov    %r13d,%edi\n 7d9:   41 ff 14 dc             callq  *(%r12,%rbx,8)\n 7dd:   48 83 c3 01             add    $0x1,%rbx\n 7e1:   48 39 dd                cmp    %rbx,%rbp\n 7e4:   75 ea                   jne    7d0 <__libc_csu_init+0x40>\n 7e6:   48 83 c4 08             add    $0x8,%rsp\n 7ea:   5b                      pop    %rbx\n 7eb:   5d                      pop    %rbp\n 7ec:   41 5c                   pop    %r12\n 7ee:   41 5d                   pop    %r13\n 7f0:   41 5e                   pop    %r14\n 7f2:   41 5f                   pop    %r15\n 7f4:   c3                      retq\n 7f5:   90                      nop\n 7f6:   66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)\n 7fd:   00 00 00\n\n0000000000000800 <__libc_csu_fini>:\n 800:   f3 c3                   repz retq\n\nDisassembly of section .fini:\n\n0000000000000804 <_fini>:\n 804:   48 83 ec 08             sub    $0x8,%rsp\n 808:   48 83 c4 08             add    $0x8,%rsp\n 80c:   c3                      retq\n```\n"
}
