ROTI Blatt 2, Ansatz 2 2009-11-03 13:18:25 procedure Test is A, B, C, D : Integer; begin A := 23; B := 42; C := 127; D := A + B; D := D - C; end Test; -------------------------------------------------------------- >objdump -d Test Test: file format elf32-i386 Disassembly of section .init: 080487c8 <_init>: 80487c8: 55 push %ebp 80487c9: 89 e5 mov %esp,%ebp 80487cb: 53 push %ebx 80487cc: 83 ec 04 sub $0x4,%esp 80487cf: e8 00 00 00 00 call 80487d4 <_init+0xc> 80487d4: 5b pop %ebx 80487d5: 81 c3 e0 15 00 00 add $0x15e0,%ebx 80487db: 8b 93 fc ff ff ff mov -0x4(%ebx),%edx 80487e1: 85 d2 test %edx,%edx 80487e3: 74 05 je 80487ea <_init+0x22> 80487e5: e8 2e 00 00 00 call 8048818 <__gmon_start__@plt> 80487ea: e8 51 01 00 00 call 8048940 80487ef: e8 2c 03 00 00 call 8048b20 <__do_global_ctors_aux> 80487f4: 58 pop %eax 80487f5: 5b pop %ebx 80487f6: c9 leave 80487f7: c3 ret Disassembly of section .plt: 080487f8 <__gnat_finalize@plt-0x10>: 80487f8: ff 35 b8 9d 04 08 pushl 0x8049db8 80487fe: ff 25 bc 9d 04 08 jmp *0x8049dbc 8048804: 00 00 add %al,(%eax) ... 08048808 <__gnat_finalize@plt>: 8048808: ff 25 c0 9d 04 08 jmp *0x8049dc0 804880e: 68 00 00 00 00 push $0x0 8048813: e9 e0 ff ff ff jmp 80487f8 <_init+0x30> 08048818 <__gmon_start__@plt>: 8048818: ff 25 c4 9d 04 08 jmp *0x8049dc4 804881e: 68 08 00 00 00 push $0x8 8048823: e9 d0 ff ff ff jmp 80487f8 <_init+0x30> 08048828 : 8048828: ff 25 c8 9d 04 08 jmp *0x8049dc8 804882e: 68 10 00 00 00 push $0x10 8048833: e9 c0 ff ff ff jmp 80487f8 <_init+0x30> 08048838 : 8048838: ff 25 cc 9d 04 08 jmp *0x8049dcc 804883e: 68 18 00 00 00 push $0x18 8048843: e9 b0 ff ff ff jmp 80487f8 <_init+0x30> 08048848 <__libc_start_main@plt>: 8048848: ff 25 d0 9d 04 08 jmp *0x8049dd0 804884e: 68 20 00 00 00 push $0x20 8048853: e9 a0 ff ff ff jmp 80487f8 <_init+0x30> 08048858 : 8048858: ff 25 d4 9d 04 08 jmp *0x8049dd4 804885e: 68 28 00 00 00 push $0x28 8048863: e9 90 ff ff ff jmp 80487f8 <_init+0x30> 08048868 <__gnat_install_handler@plt>: 8048868: ff 25 d8 9d 04 08 jmp *0x8049dd8 804886e: 68 30 00 00 00 push $0x30 8048873: e9 80 ff ff ff jmp 80487f8 <_init+0x30> 08048878 : 8048878: ff 25 dc 9d 04 08 jmp *0x8049ddc 804887e: 68 38 00 00 00 push $0x38 8048883: e9 70 ff ff ff jmp 80487f8 <_init+0x30> 08048888 <__gnat_eh_personality@plt>: 8048888: ff 25 e0 9d 04 08 jmp *0x8049de0 804888e: 68 40 00 00 00 push $0x40 8048893: e9 60 ff ff ff jmp 80487f8 <_init+0x30> 08048898 : 8048898: ff 25 e4 9d 04 08 jmp *0x8049de4 804889e: 68 48 00 00 00 push $0x48 80488a3: e9 50 ff ff ff jmp 80487f8 <_init+0x30> 080488a8 <__gnat_initialize@plt>: 80488a8: ff 25 e8 9d 04 08 jmp *0x8049de8 80488ae: 68 50 00 00 00 push $0x50 80488b3: e9 40 ff ff ff jmp 80487f8 <_init+0x30> 080488b8 <__gnat_set_globals@plt>: 80488b8: ff 25 ec 9d 04 08 jmp *0x8049dec 80488be: 68 58 00 00 00 push $0x58 80488c3: e9 30 ff ff ff jmp 80487f8 <_init+0x30> 080488c8 <__gnat_break_start@plt>: 80488c8: ff 25 f0 9d 04 08 jmp *0x8049df0 80488ce: 68 60 00 00 00 push $0x60 80488d3: e9 20 ff ff ff jmp 80487f8 <_init+0x30> Disassembly of section .text: 080488e0 <_start>: 80488e0: 31 ed xor %ebp,%ebp 80488e2: 5e pop %esi 80488e3: 89 e1 mov %esp,%ecx 80488e5: 83 e4 f0 and $0xfffffff0,%esp 80488e8: 50 push %eax 80488e9: 54 push %esp 80488ea: 52 push %edx 80488eb: 68 b0 8a 04 08 push $0x8048ab0 80488f0: 68 c0 8a 04 08 push $0x8048ac0 80488f5: 51 push %ecx 80488f6: 56 push %esi 80488f7: 68 25 8a 04 08 push $0x8048a25 80488fc: e8 47 ff ff ff call 8048848 <__libc_start_main@plt> 8048901: f4 hlt 8048902: 90 nop 8048903: 90 nop 8048904: 90 nop 8048905: 90 nop 8048906: 90 nop 8048907: 90 nop 8048908: 90 nop 8048909: 90 nop 804890a: 90 nop 804890b: 90 nop 804890c: 90 nop 804890d: 90 nop 804890e: 90 nop 804890f: 90 nop 08048910 <__do_global_dtors_aux>: 8048910: 55 push %ebp 8048911: 89 e5 mov %esp,%ebp 8048913: 83 ec 08 sub $0x8,%esp 8048916: 80 3d 6c 9f 04 08 00 cmpb $0x0,0x8049f6c 804891d: 74 0c je 804892b <__do_global_dtors_aux+0x1b> 804891f: eb 1c jmp 804893d <__do_global_dtors_aux+0x2d> 8048921: 83 c0 04 add $0x4,%eax 8048924: a3 08 9e 04 08 mov %eax,0x8049e08 8048929: ff d2 call *%edx 804892b: a1 08 9e 04 08 mov 0x8049e08,%eax 8048930: 8b 10 mov (%eax),%edx 8048932: 85 d2 test %edx,%edx 8048934: 75 eb jne 8048921 <__do_global_dtors_aux+0x11> 8048936: c6 05 6c 9f 04 08 01 movb $0x1,0x8049f6c 804893d: c9 leave 804893e: c3 ret 804893f: 90 nop 08048940 : 8048940: 55 push %ebp 8048941: 89 e5 mov %esp,%ebp 8048943: 83 ec 08 sub $0x8,%esp 8048946: a1 d4 9c 04 08 mov 0x8049cd4,%eax 804894b: 85 c0 test %eax,%eax 804894d: 74 12 je 8048961 804894f: b8 00 00 00 00 mov $0x0,%eax 8048954: 85 c0 test %eax,%eax 8048956: 74 09 je 8048961 8048958: c7 04 24 d4 9c 04 08 movl $0x8049cd4,(%esp) 804895f: ff d0 call *%eax 8048961: c9 leave 8048962: c3 ret 8048963: 90 nop 08048964 : 8048964: 55 push %ebp 8048965: 89 e5 mov %esp,%ebp 8048967: 83 ec 48 sub $0x48,%esp 804896a: 8d 45 ff lea -0x1(%ebp),%eax 804896d: 89 c2 mov %eax,%edx 804896f: b8 a0 8b 04 08 mov $0x8048ba0,%eax 8048974: c7 44 24 30 00 00 00 movl $0x0,0x30(%esp) 804897b: 00 804897c: c7 44 24 2c 01 00 00 movl $0x1,0x2c(%esp) 8048983: 00 8048984: c7 44 24 28 00 00 00 movl $0x0,0x28(%esp) 804898b: 00 804898c: c7 44 24 24 00 00 00 movl $0x0,0x24(%esp) 8048993: 00 8048994: c7 44 24 20 00 00 00 movl $0x0,0x20(%esp) 804899b: 00 804899c: 89 54 24 1c mov %edx,0x1c(%esp) 80489a0: 89 44 24 18 mov %eax,0x18(%esp) 80489a4: c7 44 24 14 20 00 00 movl $0x20,0x14(%esp) 80489ab: 00 80489ac: c7 44 24 10 20 00 00 movl $0x20,0x10(%esp) 80489b3: 00 80489b4: c7 44 24 0c 20 00 00 movl $0x20,0xc(%esp) 80489bb: 00 80489bc: c7 44 24 08 62 00 00 movl $0x62,0x8(%esp) 80489c3: 00 80489c4: c7 44 24 04 ff ff ff movl $0xffffffff,0x4(%esp) 80489cb: ff 80489cc: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) 80489d3: e8 e0 fe ff ff call 80488b8 <__gnat_set_globals@plt> 80489d8: a1 38 9f 04 08 mov 0x8049f38,%eax 80489dd: 85 c0 test %eax,%eax 80489df: 75 05 jne 80489e6 80489e1: e8 82 fe ff ff call 8048868 <__gnat_install_handler@plt> 80489e6: e8 3d fe ff ff call 8048828 80489eb: e8 68 fe ff ff call 8048858 80489f0: c6 05 24 9f 04 08 01 movb $0x1,0x8049f24 80489f7: e8 3c fe ff ff call 8048838 80489fc: c6 05 20 9f 04 08 01 movb $0x1,0x8049f20 8048a03: e8 70 fe ff ff call 8048878 8048a08: c6 05 68 9f 04 08 01 movb $0x1,0x8049f68 8048a0f: c6 05 30 9f 04 08 01 movb $0x1,0x8049f30 8048a16: c9 leave 8048a17: c3 ret 08048a18 : 8048a18: 55 push %ebp 8048a19: 89 e5 mov %esp,%ebp 8048a1b: 83 ec 08 sub $0x8,%esp 8048a1e: e8 75 fe ff ff call 8048898 8048a23: c9 leave 8048a24: c3 ret 08048a25
: 8048a25: 55 push %ebp 8048a26: 89 e5 mov %esp,%ebp 8048a28: 83 ec 18 sub $0x18,%esp 8048a2b: b8 7e 9e 04 08 mov $0x8049e7e,%eax 8048a30: 89 45 fc mov %eax,-0x4(%ebp) 8048a33: 8b 45 08 mov 0x8(%ebp),%eax 8048a36: a3 60 9f 04 08 mov %eax,0x8049f60 8048a3b: 8b 45 0c mov 0xc(%ebp),%eax 8048a3e: a3 44 9f 04 08 mov %eax,0x8049f44 8048a43: 8b 45 10 mov 0x10(%ebp),%eax 8048a46: a3 28 9f 04 08 mov %eax,0x8049f28 8048a4b: 8d 45 f4 lea -0xc(%ebp),%eax 8048a4e: 89 04 24 mov %eax,(%esp) 8048a51: e8 52 fe ff ff call 80488a8 <__gnat_initialize@plt> 8048a56: e8 09 ff ff ff call 8048964 8048a5b: e8 68 fe ff ff call 80488c8 <__gnat_break_start@plt> 8048a60: e8 13 00 00 00 call 8048a78 <_ada_test> 8048a65: e8 2e fe ff ff call 8048898 8048a6a: e8 99 fd ff ff call 8048808 <__gnat_finalize@plt> 8048a6f: a1 40 9f 04 08 mov 0x8049f40,%eax 8048a74: c9 leave 8048a75: c3 ret 8048a76: 90 nop 8048a77: 90 nop 08048a78 <_ada_test>: 8048a78: 55 push %ebp 8048a79: 89 e5 mov %esp,%ebp 8048a7b: 83 ec 10 sub $0x10,%esp 8048a7e: c7 45 f0 17 00 00 00 movl $0x17,-0x10(%ebp) 8048a85: c7 45 f4 2a 00 00 00 movl $0x2a,-0xc(%ebp) 8048a8c: c7 45 f8 7f 00 00 00 movl $0x7f,-0x8(%ebp) 8048a93: c7 45 fc 41 00 00 00 movl $0x41,-0x4(%ebp) 8048a9a: c7 45 fc c2 ff ff ff movl $0xffffffc2,-0x4(%ebp) 8048aa1: c9 leave 8048aa2: c3 ret 8048aa3: 90 nop 8048aa4: 90 nop 8048aa5: 90 nop 8048aa6: 90 nop 8048aa7: 90 nop 8048aa8: 90 nop 8048aa9: 90 nop 8048aaa: 90 nop 8048aab: 90 nop 8048aac: 90 nop 8048aad: 90 nop 8048aae: 90 nop 8048aaf: 90 nop 08048ab0 <__libc_csu_fini>: 8048ab0: 55 push %ebp 8048ab1: 89 e5 mov %esp,%ebp 8048ab3: 5d pop %ebp 8048ab4: c3 ret 8048ab5: 8d 74 26 00 lea 0x0(%esi),%esi 8048ab9: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi 08048ac0 <__libc_csu_init>: 8048ac0: 55 push %ebp 8048ac1: 89 e5 mov %esp,%ebp 8048ac3: 57 push %edi 8048ac4: 56 push %esi 8048ac5: 53 push %ebx 8048ac6: e8 4f 00 00 00 call 8048b1a <__i686.get_pc_thunk.bx> 8048acb: 81 c3 e9 12 00 00 add $0x12e9,%ebx 8048ad1: 83 ec 0c sub $0xc,%esp 8048ad4: e8 ef fc ff ff call 80487c8 <_init> 8048ad9: 8d bb 10 ff ff ff lea -0xf0(%ebx),%edi 8048adf: 8d 83 10 ff ff ff lea -0xf0(%ebx),%eax 8048ae5: 29 c7 sub %eax,%edi 8048ae7: c1 ff 02 sar $0x2,%edi 8048aea: 85 ff test %edi,%edi 8048aec: 74 24 je 8048b12 <__libc_csu_init+0x52> 8048aee: 31 f6 xor %esi,%esi 8048af0: 8b 45 10 mov 0x10(%ebp),%eax 8048af3: 89 44 24 08 mov %eax,0x8(%esp) 8048af7: 8b 45 0c mov 0xc(%ebp),%eax 8048afa: 89 44 24 04 mov %eax,0x4(%esp) 8048afe: 8b 45 08 mov 0x8(%ebp),%eax 8048b01: 89 04 24 mov %eax,(%esp) 8048b04: ff 94 b3 10 ff ff ff call *-0xf0(%ebx,%esi,4) 8048b0b: 83 c6 01 add $0x1,%esi 8048b0e: 39 f7 cmp %esi,%edi 8048b10: 75 de jne 8048af0 <__libc_csu_init+0x30> 8048b12: 83 c4 0c add $0xc,%esp 8048b15: 5b pop %ebx 8048b16: 5e pop %esi 8048b17: 5f pop %edi 8048b18: 5d pop %ebp 8048b19: c3 ret 08048b1a <__i686.get_pc_thunk.bx>: 8048b1a: 8b 1c 24 mov (%esp),%ebx 8048b1d: c3 ret 8048b1e: 90 nop 8048b1f: 90 nop 08048b20 <__do_global_ctors_aux>: 8048b20: 55 push %ebp 8048b21: 89 e5 mov %esp,%ebp 8048b23: 53 push %ebx 8048b24: bb c4 9c 04 08 mov $0x8049cc4,%ebx 8048b29: 83 ec 04 sub $0x4,%esp 8048b2c: a1 c4 9c 04 08 mov 0x8049cc4,%eax 8048b31: 83 f8 ff cmp $0xffffffff,%eax 8048b34: 74 0c je 8048b42 <__do_global_ctors_aux+0x22> 8048b36: 83 eb 04 sub $0x4,%ebx 8048b39: ff d0 call *%eax 8048b3b: 8b 03 mov (%ebx),%eax 8048b3d: 83 f8 ff cmp $0xffffffff,%eax 8048b40: 75 f4 jne 8048b36 <__do_global_ctors_aux+0x16> 8048b42: 83 c4 04 add $0x4,%esp 8048b45: 5b pop %ebx 8048b46: 5d pop %ebp 8048b47: c3 ret Disassembly of section .fini: 08048b48 <_fini>: 8048b48: 55 push %ebp 8048b49: 89 e5 mov %esp,%ebp 8048b4b: 53 push %ebx 8048b4c: 83 ec 04 sub $0x4,%esp 8048b4f: e8 00 00 00 00 call 8048b54 <_fini+0xc> 8048b54: 5b pop %ebx 8048b55: 81 c3 60 12 00 00 add $0x1260,%ebx 8048b5b: e8 b0 fd ff ff call 8048910 <__do_global_dtors_aux> 8048b60: 59 pop %ecx 8048b61: 5b pop %ebx 8048b62: c9 leave 8048b63: c3 ret