From: <sy...@us...> - 2005-04-21 01:52:07
|
Thanks for the quick answer, John Reiser... I never heard of execstack before: thanks for the pointer. $ export ELF="`find $HOME -name '_ctypes.so'` `which valgrind`" && \ execstack --query $ELF && \ readelf -l $ELF | grep GNU_STACK X /home/sylvain/python/lib/python2.4/site-packages/_ctypes.so - /home/sylvain/bin/valgrind GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4 Just as you described. I added the linker parameter `-z noexecflag' while compiling the ctypes module, and everything is working fine now. A subsidiary question though: I also attempted to link valgrind 2.4.0 from CVS passing '-z execflag' to ld (by the way: right now, the autoconf script completely ignore command-line settings for CFLAGS). Final valgrind just threw back these 'cannot enable executable stack as shared object requires' at startup on everything dynamically linked on the system, regardless of the stack permission in the ELF headers of valgrind'ed programs... I tried this too on a test machine without any kind of stack protection (no PIE, no SSP, no specialized kernel-enforcement of non-executable stack of any sort either: linux 2.6.11, gcc 2.95, glibc 2.3.4 compiled against 2.6.11 headers with previous compile), same result... But just ignore this if this is not of any use to you: you put me right on track to investigate things myself. ;-) Thanks again, -- Sylvain <sy...@us...> The trouble with computers is that they do what you tell them, not what you want. -- D. Cohen |