The "Go" ndk compiles the executable file running in Android L showing error:only position independent executables (PIE) is supported. The solution to the failure problem.

Source: Internet
Author: User

Original URL: http://blog.csdn.net/hxdanya/article/details/39371759

Since the NDK-compiled executables are called in the app, there has been no problem with versions 4.4 and earlier. Recently due to the test run on Android L found that when running the executable file, the following error is reported:

Error:only position independent executables (PIE) is supported.

The security mechanism for PIE was introduced from 4.1, but the system version before Android L did not verify that the executable was compiled based on PIE. So there is no error. However, Android L has turned on authentication and cannot run if the calling executable is not compiled based on pie. The solution is very simple, add the following flag to the ANDROID.MK.

LOCAL_CFLAGS += -pie -fPIELOCAL_LDFLAGS += -pie -fPIE

The

Go "ndk compiles the executable file in Android L to display error:only position independent executables (PIE) is supported. The solution to the failure problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.