iPhone反汇编中的objc_msgsend
我试图弄清楚在下面的反汇编中调用了什么方法,但我不知道发生了什么。据我所知,对于 objc_msgsend,第一个参数是对象指针,第二个参数是选择器(所以 r0 和 r1)。但我很难弄清楚这一点。这只是调用之前配置 r1 的部分:00042e48 f64731bc movw r1, 0x7bbc
根据我的理解,前两行将使 r1 等于 1f007bbc 但我能从那里做什么? 编辑:另外,添加 r1 和 pc 有什么作用?那之后的那行是做什么的?我尝试过“otool -o SpringBoard”,但这并没有给我选择器(不知道它是什么,但它不是我要找的)
00042e4c f2c0011f 移动 r1, 0x1f
00042e50 4479 添加 r1,pc
00042e52 6809 ldr r1, [r1, #0]
00042e54 f1c2e84a blx 0x204eec @ 符号存根:_objc_msgSend
编辑2:实际上,-o确实给了我所有的方法(我从标题中获得了许多随机方法,并在终端窗口中搜索了它们,它们就在那里)。然而,搜索“1f007bbc”没有返回任何内容。我记对了号码吗?
I'm trying to figure out what method is being called in the following bit of disassembly but I have no idea what's happening. I understand that with objc_msgsend the first argument is the object pointer and the second is the selector (so r0 and r1). But I'm having trouble figuring this out. Here's just the section before the call where r1 is being configured:00042e48 f64731bc movw r1, 0x7bbc
00042e4c f2c0011f movt r1, 0x1f
00042e50 4479 add r1, pc
00042e52 6809 ldr r1, [r1, #0]
00042e54 f1c2e84a blx 0x204eec @ symbol stub for: _objc_msgSend
From my understanding of this the first two lines would make r1 equal 1f007bbc but what can I do from there?
Edit: Also, what does adding r1 and the pc do? And what does the line after that do? And I've tried "otool -o SpringBoard" but that doesn't give me the selectors (don't know what it is but it isn't what I'm looking for)
Edit 2: Actaully, -o does give me all the methods (I got loads of random methods from the headers and searched them in the terminal window and they were there). However a search for "1f007bbc" didn't return anything. Did I get the number right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有权访问调试器,则应该能够
p (char*) 1f007bbc
并且它会打印选择器名称。选择器通常是不变的,因此,您也应该能够通过拆开 mach-o 从二进制文件中提取它。
If you have access to the debugger, you should be able to
p (char*) 1f007bbc
and it'll print the selector name.The selectors are generally constant and, thus, you should be able to extract this from the binary, too, by taking apart the mach-o.