You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, a really useful docker container as all I needed was a PIE ssh client and I've never compiled NDK stuff before.
However the PIE output (at least for the ARM ssh client) wasn't actually a PIE executable.
It seemed that the final linking(?) command didn't have the PIE flags, so I brute forced a solution by adding -pie -fPIE to the end of the COMPILER=${TOOLCHAIN}/bin/arm-linux-androideabi-gcc line
Which worked, but I'm pretty sure this isn't the correct way to fix this.
Cheers,
Ian
The text was updated successfully, but these errors were encountered:
The answer is that the -pie flag have to be set on LDFLAGS for executables.
@@ -75,6 +75,7 @@ for ARCH_NAME in mips arm x86; do
if [ $BIN_TYPE == "pie" ]; then
export CFLAGS="-g -O2 -pie -fPIE"
+ export LDFLAGS="-pie"
# Use the default platform target for pie binaries
unset GOOGLE_PLATFORM
else
Hi,
First of all, a really useful docker container as all I needed was a PIE ssh client and I've never compiled NDK stuff before.
However the PIE output (at least for the ARM ssh client) wasn't actually a PIE executable.
It seemed that the final linking(?) command didn't have the PIE flags, so I brute forced a solution by adding
-pie -fPIE
to the end of theCOMPILER=${TOOLCHAIN}/bin/arm-linux-androideabi-gcc
lineWhich worked, but I'm pretty sure this isn't the correct way to fix this.
Cheers,
Ian
The text was updated successfully, but these errors were encountered: