Also enable -no-pie on Gnu toolchain (previously available on Darwin only).
Non-PIE executables won't even start on recent Android, and DT_RPATH is ignored by the loader.
Paths
| Differential D38430
Enable -pie and --enable-new-dtags by default on Android. ClosedPublic Authored by eugenis on Sep 29 2017, 2:50 PM.
Details Summary Also enable -no-pie on Gnu toolchain (previously available on Darwin only). Non-PIE executables won't even start on recent Android, and DT_RPATH is ignored by the loader.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Oct 24 2017, 11:49 PM Closed by commit rL316606: Enable -pie and --enable-new-dtags by default on Android. (authored by eugenis). · Explain WhyOct 25 2017, 1:39 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 120306 cfe/trunk/lib/Driver/SanitizerArgs.cpp
cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
cfe/trunk/lib/Driver/ToolChains/Linux.cpp
cfe/trunk/test/Driver/android-pie.c
cfe/trunk/test/Driver/fsanitize.c
cfe/trunk/test/Driver/linux-ld.c
cfe/trunk/test/Driver/pic.c
cfe/trunk/test/Driver/sanitizer-ld.c
|
Why only on API level >= 16? If I create an executable targeting an older API level, it should still work on higher API levels.