How to find offset of a function in a library when mapped --- continuation
How to find offset of a function in a library when mapped --- continuation
- Subject: How to find offset of a function in a library when mapped --- continuation
- From: Prokash Sinha <email@hidden>
- Date: Wed, 02 Sep 2015 11:00:14 -0700
I’m not looking for dlopen etc., programmatically.
What I need is more like a debugger …
I can use otool on a library like /usr/lib/system/libsystem_c.dylib, and look for a label with some assembler code ( not just a bare jmp to a stub or such), note down the offset of that label.
Now I can turn DYLD flags to make sure when I use normal tty commands it shows bindings etc, and to be more sure do a vmmap on an existing pid < or program to run> and take a look at the maps. So to be sure they function(s) I’m looking for is coming from lib system_c.dylib.
I see it is mapped and the path is clearly there, so assuming - when any of the functions of that library would be used, they would be loaded into the mapped region. And the function offset would be relative to the beginning of the mapped region.
Is this a correct assumption ?
Thanks,
Prokash
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden