I use app-misc/pax-utils-0.3.0 and sys-apps/paxctl-0.7-r1. pax-mark() function from pax-utils.eclass uses scanelf if paxctl is unavailable. 'pax-mark m ${file}' would result in 'paxctl -qm ${file}' or 'scanelf -Xxz m ${file}'. $ cd /tmp $ touch libtest.c $ echo "int main(){;}" > test.c $ gcc -fPIC -shared -o libtest.so libtest.c $ gcc -o test test.c -Wl,-rpath,. -L. -ltest $ ./test $ scanelf -x libtest.so TYPE PAX FILE ET_DYN ---xe- libtest.so $ /sbin/paxctl -m libtest.so $ scanelf -x libtest.so TYPE PAX FILE ET_DYN --mxe- libtest.so $ ./test $ # Recreate libtest.so to avoid any interference with changes made by paxctl $ gcc -fPIC -shared -o libtest.so libtest.c $ scanelf -Xxz m libtest.so TYPE PAX FILE ET_DYN --mxe- libtest.so $ ./test ./test: error while loading shared libraries: ./libtest.so: nonzero padding in e_ident $
*** Bug 413237 has been marked as a duplicate of this bug. ***
*** Bug 413671 has been marked as a duplicate of this bug. ***
looking at the history, seems like this flag has always been broken. checking out the original implementation shows the same behavior. $ make clean && make -j4 scanelf && gcc -fPIC test.c -o libfoo.so -shared $ ./scanelf -Xxz m libfoo.so && readelf -h libfoo.so | sed -n 2p Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 04 00
since `chpax` is unsupported, i think we should drop EI_PAX from pax-utils too. our linker has produce PT_PAX_FLAGS for a very long time now. that's what's causing things to break -- scanelf will update both PT_PAX_FLAGS and EI_PAX where as the paxctl tool will modify PT_PAX_FLAGS and skip EI_PAX if the PT exists. http://sources.gentoo.org/gentoo-projects/pax-utils/scanelf.c?r1=1.241&r2=1.242
*** Bug 418197 has been marked as a duplicate of this bug. ***
The latest 20120601 armv7a stage is still affected by this bug. When is this fix going to be deployed?
...and there we are! :) Thanks guys.