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?
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.