Question: Consider the functions below, with both C code and compiled assembly provided. Recall that gets ( buf ) simply copies input in to buf. The
Consider the functions below, with both C code and compiled assembly provided. Recall that getsbuf simply copies input in to buf. The inintial values of rsp rbp and rip are provided. The initial value of rip tells you the first instruction which will start to execute: the push at the start of testfunc. You can assume that the leaveq instruction is equivalent to movq $rbp $rsp followed by popq $rbp
Find the answers to parts a through WITHOUT TRYING TO BUILD YOUR OWN CODE ONLY USE THE INFO PROVIDED IN THE QUESTION!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
