memory and shared library

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
jtlb
Member
Member
Posts: 29
Joined: Sat May 12, 2007 8:24 am

memory and shared library

Post by jtlb »

Is it possible to make chunk of memory accessible only by a given shared library but not by the application linked against this library?
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: memory and shared library

Post by JohnnyTheDon »

Using the conventional method of implementing shared libraries (mapping the library into the applications address space) it is kind of difficult. One way I can think of is keeping the shared library mapped out until a call to it is made, and then making some kind of jump gate to map in the library.

Something like this:

Code: Select all

_libfunc_x:
     call mapInLib
     jmp libfunc_x
The library would then have to map out the memory region you are tyring to protect before it returns
Post Reply