You can use the pax-utils-0.1.15 package, and 'scanelf -qT' on libbfd.so. Also see http://www.gentoo.org/proj/en/hardened/pic-fix-guide.xml I think you'll find the textrel is from ssp_local.c, which is compiled in libssp_nonshared.a and then linked to libbfd.so.
I can't remember for sure, but I think it may also be caused by the non-pic libiberty.a being linked to libssp_nonshared.a. The GCC build system builds two libiberty's, and uses the static one for static libraries and for exe programs. The build system uses the local copy of libiberty's, not the one in /tools/lib or /usr/lib, but uses the installed copy of libssp_nonshared.a. When I had this problem I got distracted by installing a shared libiberty.so and adding libssp to uClibc, so I don't think I ever found a fix for it. I think the fix is in adding -fpic to libssp/Makefile.in and installing the new pic version of libssp_nonshared.a. libssp/ depends on libiberty/, and maybe libcpp/... so for a workaround I suggest you try adding -fno-stack-protector to the butterfly CFLAGS so it can build without textrels, then build 'make configure-target-libssp' and 'make all-target-libssp', and install libssp_nonshared.a to /tools/lib by hand. Then retry building butterfly normally, with -fpic in libssp/Makefile.in. I'm not sure this will be successful. The gcc fpie patch uses -fpic only if -shared, -nostdlib, or -nostartfiles are used, so it might be passing -fpie to libssp_nonshared.a, which is causing -fpie to find its way into libbfd.so. Sorry I can't help with this better, I'm still on the Bash/headers problem. robert
pgpurCb602H3L.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/hlfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
