Answered step by step
Verified Expert Solution
Question
1 Approved Answer
foo() calls bar(). bar() starts at address 0x004004CD. If you look at the machine code for foo()'s call to bar(), however, you'll see that the
foo() calls bar(). bar() starts at address 0x004004CD. If you look at the machine code for foo()'s call to bar(), however, you'll see that the actual number in the function call is 0xFFFF,FFB8
0x04004e1
. . .
40050e: 89 c7 mov %eax,%edi
400510: e8 b8 ff ff ff callq 4004cd
400515: 89 45 f8 mov %eax,-0x8(%rbp)
. . .
- What number did the CPU add with 0xFFFF,FFB8 to get the address of bar(), 0x0040,04CD?
- Do this addition. Compute 0x0040,04CD.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started