Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No stack or heap when doing objdump

When I do objdump -x -d name_of_some_c_executable, I don't see the stack or the heap segments anywhere. Why?

**Clarification**:
objdump is defined as a program for displaying various 
information about object files.

What I mean by "name_of_some_c_executable": I have a name.c, I do gcc name.c -o name, then I do objdump -x -d name.

like image 532
ajfbiw.s Avatar asked Aug 06 '26 10:08

ajfbiw.s


1 Answers

Stack and heap are runtime concepts, which have no pre-baked segment in the executable. Since they are just scratch space used dynamically, there's no reason why they should be present in the executable; they are created automatically at process (heap) or thread (stack) creation.

like image 194
Matteo Italia Avatar answered Aug 08 '26 02:08

Matteo Italia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!