什么是&QUOT的可能原因;未能映射从共享对象段:操作不允许&QUOT ;,以及如何调试? [英] What are possible causes of "failed to map segment from shared object: operation not permitted", and how to debug?

查看:722
本文介绍了什么是&QUOT的可能原因;未能映射从共享对象段:操作不允许&QUOT ;,以及如何调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个可执行文件,这两个交叉编译在Android上运行。我在同一个目录都放在设备上。我已经把所有的共享库,它们依赖于同一个目录,包括LD-linux.so.3。我通过运行可执行文件:

I have two executables, both cross compiled to run in Android. I have put both on the device in the same directory. I have put all the shared libraries that they are dependent on in the same directory, including ld-linux.so.3. I run the executables by using:

LD-linux.so.3 --library路径/路径/要/库executable_name

ld-linux.so.3 --library-path /path/to/libraries executable_name

这是任何用户运行时老版本的Andr​​oid系统都工作。在Android的最新版本中都工作,如果以root身份运行。只有一个以任何用户运行时,适用于Android的最新版本。相反,它提供了:

both work on older versions of Android when running as any user. The both work on the latest version of Android if running as root. Only one works on the latest version of android when running as any user. Instead it gives:

无法从共享对象映射段:不允许executable_name操作

failed to map segment from shared object: executable_name operation not permitted

我怎么能找出什么是不会运行的可执行文件有什么不同?

How can I find out what is different with the executable that won't run?

我在网上读了很多,并且得到这个错误大多数人来说,无论是:

I read a lot online and most people that get this error, either:

A)不具有执行权限它们依赖于或可执行文件本身的图书馆之一。

A) don't have execute permissions for one of the libraries they are dependent on or the executable itself.

B)正试图从安装为一个NOEXEC目录中运行。

B) are trying to run from a directory that is mounted as NOEXEC.

这两种不出现这种情况。它可以找到所有的图书馆,我可以自行加载任何库,看看有什么其他的东西它是依赖于得到解决。另外,我可以运行从感兴趣的目录基本的脚本。

both of these don't appear to be the case. It can find all libraries and I can load any library by itself and see what other things it is dependent on being resolved. Also, I can run basic scripts from the directories of interest.

Android的,果冻豆,较新的版本是不同的Linux内核版本,我不知道这是否是相关的。

The newer version of Android, Jelly Bean, is a different linux kernel version and I wonder if that is related.

什么做的呢?如何调试?

What give? How do I debug?

推荐答案

这个问题是与可执行文件是如何被编译。他们需要与适当的支持新设备的手臂交叉编译器来编译。编译器我用生成的可执行文件,将只对ARM器件的子集。这个问题是不是与不同版本的Andr​​oid。

The issue was with how the executables were compiled. They needed to be compiled with a cross compiler that properly supported newer arm devices. The compiler I used generated executables that would only work on a subset of arm devices. The issue was not with the different versions of android.

这篇关于什么是&QUOT的可能原因;未能映射从共享对象段:操作不允许&QUOT ;,以及如何调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆