I don't know why PAX always kill my process. The platform is powerpc and OS is Linux. From the kernel log, I can see as following:
PAX: From 147.128.23.67: execution attempt in: , 100a3000-10175000 100a3000 PAX: terminating task: /mnt/ecim/pau6000agent/bin/agent_z(agent_z):1744, uid/euid: 0/0, PC: 100a318c, SP: bbc85aa0 PAX: bytes at PC: 396001fc 4bfffbdc 39600200 4bfffbd4 39600204 gpr_get: partial register set
Google told me to try with 'paxctl -m ./agent_z' or 'paxctl -z ./agent_z', but none of them helps. Actually, 'agent_z' doesn't have any PAX flags. So it really confuse me why PAX always kill 'agent_z'
file ./agent_z does not have a PT_PAX_FLAGS program header, try
conversion root@QorIQ:/mnt/ecim/pau6000agent/bin> paxctl -v ./agent_z PaX control v0.5 Copyright 2004,2005,2006,2007 PaX Team file ./agent_z does not have a PT_PAX_FLAGS program header, try conversion
Here is the information of the gcc I am using. And moreover, as suggested by others, I also have tried adding -O1/-O2/-O3 flags when compile, but none of them works.
Using built-in specs. Target: powerpc-wrs-linux-gnu Configured with: /scratch/jmyers/wrs/4.4a/src/gcc-4.4-wrs/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=powerpc-wrs-linux-gnu --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-long-double-128 --enable-targets=all --enable-secureplt --with-cpu-32=603 --with-cpu-64=970 --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --disable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Wind River Linux Sourcery G++ 4.4a-341' --with-bugurl=support@windriver.com --disable-nls --prefix=/opt/windriver/wrlinux/ppc --with-sysroot=/opt/windriver/wrlinux/ppc/powerpc-wrs-linux-gnu/libc --with-build-sysroot=/scratch/jmyers/wrs/4.4a/power/install/powerpc-wrs-linux-gnu/libc --with-gmp=/scratch/jmyers/wrs/4.4a/power/obj/host-libs-4.4a-341-powerpc-wrs-linux-gnu-i686-pc-linux-gnu/usr --with-mpfr=/scratch/jmyers/wrs/4.4a/power/obj/host-libs-4.4a-341-powerpc-wrs-linux-gnu-i686-pc-linux-gnu/usr --with-ppl=/scratch/jmyers/wrs/4.4a/power/obj/host-libs-4.4a-341-powerpc-wrs-linux-gnu-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/jmyers/wrs/4.4a/power/obj/host-libs-4.4a-341-powerpc-wrs-linux-gnu-i686-pc-linux-gnu/usr --with-libelf=/scratch/jmyers/wrs/4.4a/power/obj/host-libs-4.4a-341-powerpc-wrs-linux-gnu-i686-pc-linux-gnu/usr --disable-libgomp --with-license=/scratch/jmyers/wrs/4.4a/power/obj/host-libs-4.4a-341-powerpc-wrs-linux-gnu-i686-pc-linux-gnu/usr --with-csl-license-version=20110917 --with-csl-license-feature=gcc_Power_Wind_River_Linux --enable-poison-system-directories --with-debug-prefix-map='/scratch/jmyers/wrs/4.4a/power/install=/opt/windriver/wrlinux/ppc /scratch/jmyers/wrs/4.4a/src/gcc-4.4-wrs=/opt/windriver/wrlinux/ppc/powerpc-wrs-linux-gnu/src/gcc /scratch/jmyers/wrs/4.4a/power/obj/gcc-4.4a-341-powerpc-wrs-linux-gnu-i686-pc-linux-gnu=/opt/windriver/wrlinux/ppc/powerpc-wrs-linux-gnu/src/generated/gcc' --with-build-time-tools=/scratch/jmyers/wrs/4.4a/power/install/powerpc-wrs-linux-gnu/bin --with-build-time-tools=/scratch/jmyers/wrs/4.4a/power/install/powerpc-wrs-linux-gnu/bin Thread model: posix gcc version 4.4.1 (Wind River Linux Sourcery G++ 4.4a-341)
Thanks in advance, and really appreciate your reply.
Best Regards, Junzhao Cai