Re: Error Building GCC as PIE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> While researching how to cross-compile for PIE, I discovered my theory was based on a faulty premise: that PIE binaries will only run on Android 5.0.

My bad... I parsed this wrong the first time....

PIE was introduced in Android 4.1. From "Security Enhancements in
Android 1.5 through 4.1"
(https://source.android.com/devices/tech/security/enhancements/enhancements41.html):

    Android 4.1

        PIE (Position Independent Executable) support
        ...

If you try and run a PIE binary on Android 4.0 or below, the the AOSP
link/loader will crash. It will segfault in /system/bin/linker. See,
for example, http://stackoverflow.com/q/8484814.

I was told the solution is to provide a custom loader, but I never pursued it.

Jeff

On Sun, Jun 21, 2015 at 11:36 PM, Jeffrey Walton <noloader@xxxxxxxxx> wrote:
> On Fri, Jun 19, 2015 at 1:23 PM, Cyd Haselton <chaselton@xxxxxxxxx> wrote:
>> While researching how to cross-compile for PIE, I discovered my theory was based on a faulty premise: that PIE binaries will only run on Android 5.0.
>>
>
> As far as I know, this is true. Android 5.0 requires PIE. From
> "Security Enhancements in Android 5.0"
> (https://source.android.com/devices/tech/security/enhancements/enhancements50.html):
>
>     Non-PIE linker support removed. Android now requires all
>     dynamically linked executables to support PIE (position
>     independent executables). This enhances Android’s address
>     space layout randomization (ASLR) implementation.
>




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux