Problem with dlopen
Problem with dlopen
- Subject: Problem with dlopen
- From: Gordo Cath <email@hidden>
- Date: Mon, 25 Jul 2016 10:51:00 -0400
Hi,
I'm using 10.10.5 and using the code from http://www.newosxbook.com/src.jl?tree=listings&file=inject.c
I created my own simple library from the sample at the bottom of the file using Xcode 6.2.
everything compiles fine and I'm not arm64.
When I go to run i use 2 instances of lldb. one on the target and one in the one running inject.
I setup a breakpoint on dlopen in the target. I watch it go through the process of loading my library.
of interest is rbx appears to have the name of the library and r14 is set to 0. I have seen other runtime examples have r14 set to name of the library and rbx set to the number of characters of the name of the library.
Anyways, it always crashes at addr 0x7fff62ac56097 0f 29 45 c0 movaps %xmm0 -0x40(:rbp) -- which if i understand it is trying to save off a value to a location 0x40 ahead of where base pointer is now at. I've checked my settings and it appears to be a legitimate location. The values are all 0 The instruction right before it is a xorps %xmm0, %xmm0
I don't know if the 0x7fff62ac56097 holds across other programs but it /usr/lib/dyld.dylib
I tried googling to see if this is a known bug. I'm wondering if not having the # characters set in the name in a register is the problem.
any ideas?
Thanks
Gordo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden