plt_0

记录下动态延迟加载,在unicore上没运行起来,所以在x86上运行

函数test.c

1 #include<stdio.h>

2

3 int main(void)

4 {

5 printf("abcdefg\n");

6 return 0;

7 }

反汇编(省略了相当一部分,因为没看懂且与PLT无关)

207 080482e0 <puts@plt-0x10>:

208 80482e0: ff 35 f8 9f 04 08 pushl 0x8049ff8

209 80482e6: ff 25 fc 9f 04 08 jmp *0x8049ffc

210 80482ec: 00 00 add %al,(%eax)

211 ...

212

213 080482f0 <puts@plt>:

214 80482f0: ff 25 00 a0 04 08 jmp *0x804a000

215 80482f6: 68 00 00 00 00 push $0x0

216 80482fb: e9 e0 ff ff ff jmp 80482e0 <_init+0x30>



305 080483d4 <main>:

306 80483d4: 55 push %ebp

307 80483d5: 89 e5 mov %esp,%ebp

308 80483d7: 83 e4 f0 and $0xfffffff0,%esp

309 80483da: 83 ec 10 sub $0x10,%esp

310 80483dd: c7 04 24 c0 84 04 08 movl $0x80484c0,(%esp)

311 80483e4: e8 07 ff ff ff call 80482f0 <puts@plt>

312 80483e9: b8 00 00 00 00 mov $0x0,%eax

313 80483ee: c9 leave

314 80483ef: c3 ret



416 Disassembly of section .rodata:

417

418 080484b8 <_fp_hw>:

419 80484b8: 03 00 add (%eax),%eax

420 ...

421

422 080484bc <_IO_stdin_used>:

423 80484bc: 01 00 add %eax,(%eax)

424 80484be: 02 00 add (%eax),%al

425 80484c0: 61 popa

426 80484c1: 62 63 64 bound %esp,0x64(%ebx)

427 80484c4: 65 gs

428 80484c5: 66 data16

429 80484c6: 67 addr16



658 Disassembly of section .got:

659

660 08049ff0 <.got>:

661 8049ff0: 00 00 add %al,(%eax)

662 ...

663

664 Disassembly of section .got.plt:

665

666 08049ff4 <_GLOBAL_OFFSET_TABLE_>:

667 8049ff4: 28 9f 04 08 00 00 sub %bl,0x804(%edi)

668 8049ffa: 00 00 add %al,(%eax)

669 8049ffc: 00 00 add %al,(%eax)

670 8049ffe: 00 00 add %al,(%eax)

671 804a000: f6 82 04 08 06 83 04 testb $0x4,-0x7cf9f7fc(%edx)

672 804a007: 08 16 or %dl,(%esi)

673 804a009: 83 .byte 0x83

674 804a00a: 04 08 add $0x8,%al

 

 

posted on 2012-06-05 20:25  阿加  阅读(443)  评论(0编辑  收藏  举报

导航