0

http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.htmlを読んで、手作業で検証しようとしています。

_start の逆アセンブリは、次のように与えられます。

080482e0 <_start>: 80482e0: 31 ed xor %ebp,%ebp
80482e2: 5e pop %esi
80482e3: 89 e1 mov %esp,%ecx 
80482e5: 83 e4 f0 and $0xfffffff0,%esp 
80482e8: 50 push %eax 
80482e9: 54 push %esp 
80482ea: 52 push %edx 
80482eb: 68 00 84 04 08 push $0x8048400 
80482f0: 68 a0 83 04 08 push $0x80483a0 
80482f5: 51 push %ecx 80482f6: 56 push %esi 
80482f7: 68 94 83 04 08 push $0x8048394 
80482fc: e8 c3 ff ff ff call 80482c4 <__libc_start_main@plt> 
8048301: f4 hlt

ただし、私自身の分解は次のとおりです。

0x00000000004003c0 <+0>:     xor    ebp,ebp
0x00000000004003c2 <+2>:     mov    r9,rdx
0x00000000004003c5 <+5>:     pop    rsi
0x00000000004003c6 <+6>:     mov    rdx,rsp
0x00000000004003c9 <+9>:     and    rsp,0xfffffffffffffff0
0x00000000004003cd <+13>:    push   rax
0x00000000004003ce <+14>:    push   rsp
0x00000000004003cf <+15>:    mov    r8,0x400650
0x00000000004003d6 <+22>:    mov    rcx,0x4005c0
0x00000000004003dd <+29>:    mov    rdi,0x40051c
0x00000000004003e4 <+36>:    call   0x4003b0 <__libc_start_main@plt>
0x00000000004003e9 <+41>:    hlt    
0x00000000004003ea <+42>:    nop
0x00000000004003eb <+43>:    nop 

だから私の質問は、最初の逆アセンブリでスタックにプッシュされた __libc_start_main の引数に何が起こったのですか?

私のファイルは「ELF 64 ビット LSB 実行可能ファイル、x86-64、バージョン 1 (SYSV)、動的にリンク (共有ライブラリを使用)、削除されていない」です。つまり、http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.htmlのファイルとして動的にリンクされています。

これは、私のシステムが 64 ビットで、リンクで使用されているシステムが 32 ビットであるためですか? __libc_start_main の定義は変更されましたか?

4

0 に答える 0