Version: 3.0.1 (using KDE KDE 3.4.1) Installed from: 0Gentoo Packages Compiler: gcc-3.3.6 - gcc-3.4.4 OS: Linux Hello. The current and previous versions of valgrind do not compile the helper apps correctly as pure pic shared objects. I've tested this in the gentoo install of valgrind and confirmed it by building vanilla by hand. ET_DYN TEXTREL ./helgrind/vgtool_helgrind.so ET_DYN TEXTREL ./memcheck/vgpreload_memcheck.so ET_DYN TEXTREL ./memcheck/vgtool_memcheck.so ET_DYN TEXTREL ./massif/vgtool_massif.so ET_DYN TEXTREL ./lackey/vgtool_lackey.so ET_DYN TEXTREL ./addrcheck/vgpreload_addrcheck.so ET_DYN TEXTREL ./addrcheck/vgtool_addrcheck.so ET_DYN TEXTREL ./cachegrind/vgtool_cachegrind.so ET_DYN TEXTREL ./none/vgtool_none.so The total number of text relocations in all modules ammount to 5540. I hope I dont have to explain why this is a bad thing. I'll attach a patch to correct the problems
Created attachment 13253 [details] valgrind-3.0.1-pic-fix.patch cd valgrind-3.0.1 cat valgrind-3.0.1-pic-fix.patch | patch -p1 aclocal automake
I believe that my biarch patch (which hasn't gone in yet) fixes this as a side effect of the build process reworking that I did. Certainly objdump and readelf suggest that there are very few relocations but I haven't found anything that produces a report in the format you gave?
It's probably worth mentioning that in the repository code the vgtool_*.so files are no longer built (due to static linking of the core with each tool) but the vgpreload_*.so files are still built.
re: #2, the output in solar's report comes from a tool available under Gentoo as pax-utils, in particular, 'scanelf -t' produced it. readelf -d|grep TEXTREL achieves the same goal, so does eu-findtextrel from elfutils.
My biarch patch does fix this then - eu-findtextrel reports no text relocations for any of the shared objects when it is applied.
Care to post a link to your biarch patch to gain a little pre testing?
The reason the patch isn't in yet is that you have to futz around with things to build when it is applied as we need to sort out how to build multiple copies of VEX before it will all work smoorthly.
The biarch patch has gone in now so as of SVN revision 5031 this should be fixed.