Memory layout of executable

Posted by Ross on Stack Overflow See other posts from Stack Overflow or by Ross
Published on 2011-01-16T21:51:11Z Indexed on 2011/01/16 21:53 UTC
Read the original article Hit count: 371

Filed under:
|
|

Hi all,

When loading an executable then segments like the code, data, bss and so on need to be placed in memory. I am just wondering, if someone could tell me where on a standard x86 for example the libc library is placed. Is that at the top or bottom of memory. My guess is at the bottom, close to the application code, ie., that would look something like this here:

---------  0x1000
Stack
  |
  V

  ^
  |
Heap
----------
Data + BSS
----------

App Code

----------

libc

---------- 0x0000

Thanks a lot, Ross

© Stack Overflow or respective owner

Related posts about c

    Related posts about memory