memory and shared library
memory and shared library
Is it possible to make chunk of memory accessible only by a given shared library but not by the application linked against this library?
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: memory and shared library
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:
The library would then have to map out the memory region you are tyring to protect before it returns
Something like this:
Code: Select all
_libfunc_x:
call mapInLib
jmp libfunc_x