Reputation: 19333
I'm familiar with general program memory layout (ie: text segment, data segment, heap, stack, etc), and am trying to find something similar to the description and diagrams here:
http://www.tenouk.com/Bufferoverflowc/Bufferoverflow1c.html
However, I'm trying to figure out three distinct cases, each involving the use of external libraries:
libtest.a
in the ldflags
)libtest.so
in the ldflags
)libtest.so
NOT in the ldflags
, but the library is loaded via dlopen()
/dlsym()
calls)Can someone more familiar with this explain the memory layout to me? I'm especially interested in the distinction, if any, between cases (2)
and (3)
.
Thank you.
Upvotes: 2
Views: 91
Reputation: 2576
I've found the Solaris Linker Guide (at http://docs.oracle.com/cd/E26502_01/html/E26507/index.html) to be very well written, and incredibly useful at explaining an immensely complex utility.
Diagram-wise, you might find those at http://docs.oracle.com/cd/E26502_01/html/E26507/chapter6-93046.html#scrolltoc, http://docs.oracle.com/cd/E26502_01/html/E26507/chapter6-34713.html#scrolltoc to be helpful.
Upvotes: 1