Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is the disassembly of C procedure multstore which calls mult2 to multiply two numbers together and then stores the result into a memory location

image text in transcribed

Here is the disassembly of C procedure multstore which calls mult2 to multiply two numbers together and then stores the result into a memory location pointed to by its third parameter (gdb) disass multstore 0x000000000040047c: 0x000000000040047d: 0x0000000000400480: 0x0000000000400485: 0x0000000000400488: 0x0000000000400489: ush trbx mov calla 0x400474 mov %rax, (%rbx) retq (gdb) disass mult2 0x0000000000400474: 0x0000000000400477: 0x000000000040047b: mov imul retq %rsi, %rax trdi , trax When multstore is called, there is an unknown return address on the stack. Referring to the disassembly, sketch the stack after each instruction that changes the stack. Also show the program counter %rip. Step 1 has been done for you as an example ult Unknown return address %rsp 0x40047d %rip After retq in mult2 0 bx in multsto Here is the disassembly of C procedure multstore which calls mult2 to multiply two numbers together and then stores the result into a memory location pointed to by its third parameter (gdb) disass multstore 0x000000000040047c: 0x000000000040047d: 0x0000000000400480: 0x0000000000400485: 0x0000000000400488: 0x0000000000400489: ush trbx mov calla 0x400474 mov %rax, (%rbx) retq (gdb) disass mult2 0x0000000000400474: 0x0000000000400477: 0x000000000040047b: mov imul retq %rsi, %rax trdi , trax When multstore is called, there is an unknown return address on the stack. Referring to the disassembly, sketch the stack after each instruction that changes the stack. Also show the program counter %rip. Step 1 has been done for you as an example ult Unknown return address %rsp 0x40047d %rip After retq in mult2 0 bx in multsto

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions