How to find offset of a function in a library when mapped --- continuation
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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.app... This email sent to site_archiver@lists.apple.com
participants (1)
-
Prokash Sinha