unix api -mmap() 可以在 iPhone 操作系统上正常工作吗?

发布于 2024-09-30 05:17:29 字数 230 浏览 0 评论 0原文

我需要知道“映射”虚拟内存并将二进制代码加载到其中并执行二进制代码的可行性。二进制代码(以共享库的形式呈现)可以是mach格式或elf格式,它们将通过我们的二进制加载器(而不是苹果自己的unix二进制加载器)通过文件映射方式加载到内存中。

以前有人尝试过吗?如果您对此有任何线索,请告诉我,我们可以进一步讨论。 顺便问一下,有谁知道如何将共享库(不是通过应用程序链接)上传到iPhone模拟器或与iPhone应用程序一起开发的设备?

I need to know the feasibility of "mmaping" a virtualmemory and loading binary code into it and execute the binary code. The binary code (presented as shared library) may be mach format or elf format, which will be loaded into the memory through file-mapping way by our binary loader other than the apple's own unix binary loader.

Has someone tried it before? If you have any clue about that please tell me, and we can discuss it more.
By the way, does anyone know how to upload a shared library (not linked by app) to iPhone simulator or device with iPhone app developed together?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蹲在坟头点根烟 2024-10-07 05:17:29

您可以在 iPhone 上使用 mmap()。 iOS SDK 协议通常反对动态代码加载,因此您可能不被允许使用它来提供应用程序发布时不可用的代码。你会想和苹果谈谈这个问题,但我很有信心预测你想做的事情不会被允许。

考虑一下您提供自己的代码加载器的原因是否真实,或者您是否真的可以使用 iOS dyld

You can use mmap() on the iPhone. The iOS SDK agreement is generally against dynamic code loading, so you will probably not be allowed to use it to provide code that was not available when the app was shipped. You will want to talk to Apple about that, but I feel quite confident in predicting that what you want to do won't be permitted.

Consider whether your reason for supplying your own code loader is genuine, or whether you can actually get away with using the iOS dyld.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文