I have the code for the following structure:
void foo1(uint32_t *num_failures) { ... } void foo2(uint32_t *num_failures) { ... } void foo3(uint32_t *num_failures) { ... } void test() { uint32_t num_failures = 0; foo1(&num_failures); foo2(&num_failures); foo3(&num_failures); }
Now, what I did is add the following command to foo1 () :
void foo1(uint32_t *num_failures) { ... (*num_failures)++; }
And suddenly I see that the stack size printed inside foo2 () is 36 bytes larger.
I made objdump and copied for <characters>. Having the following:
Before the change:
... 00004e08 <test>:
After the change:
... 00004e08 <foo2>: 00005588 <test>:
So, I think the foo2 function is no longer inline.
- Am I right?
- Any explanation why this happened?
- What happened to foo3 () after the change? Did it become inline inside foo2 () or inside test () ?
Not necessary if necessary: โโI use gcc for the arc processor.
source share