title: What are possible causes of "failed to map segment from shared object: operation not permitted", and how to debug?
body: <p>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:</p>
  
  <p>ld-linux.so.3 --library-path /path/to/libraries executable_name</p>
  
  <p>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:</p>
  
  <p>failed to map segment from shared object: executable_name operation not permitted</p>
  
  <p>How can I find out what is different with the executable that won't run?  </p>
  
  <p>I read a lot online and most people that get this error, either:</p>
  
  <p>A) don't have execute permissions for one of the libraries they are dependent on or the executable itself.</p>
  
  <p>or</p>
  
  <p>B) are trying to run from a directory that is mounted as NOEXEC.</p>
  
  <p>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.</p>
  
  <p>The newer version of Android, Jelly Bean, is a different linux kernel version and I wonder if that is related. </p>
  
  <p>What give?  How do I debug? </p>