Search code examples
shared-librariesmemory-addresscpu-architecturevirtual-address-space

How can I get the virtual address of a shared library by the use of computer architecture state?


I am using a computer architecture simulator. I want to get the virtual address of a shared library of a program. What I can get from the simulator is computer architecture state, such as registers.

Can I do some math to get the virtual address of a shared library given a specified shared library name?


Solution

  • One thing that worked for me was to take a look at the java virtual machine source code. They catch the errors that occur when you call a native library and print all the stack, registers and what is available. I don't remember the details and you cannot use the code for commercial purposes but it is a great start.