My x86_64-*-linux-gnu build of glibc wasn't passing all tests. One of the reason for failures was that the test for --as-needed as broken: it compiled a source file without -fPIC, then attempted to include it in a shared library. The relocations emitted in the eh_frame and debugging sections caused the file to be rejected by the linker. A number of other tests that used to fail because of this mistake pass after installing the following patch. Please check it in. I haven't included the changes autoconf made to the configure script, only configure.in. For the record, the failure mode was that tests such as tst-cancelx4 aborted. That was because the main executable ended up linked with libgcc_eh.a, taking a number of functions from it, whereas libpthread dlopen()ed libgcc_s.so.1 to obtain such functions for thread cancellation. The shared-library copy initialized its dwarf reg sizes table correctly, per libpthread's request, whereas the other didn't get it initialized at all. However, the dynamic loader resolved the personality function in the main executable to the copy in the main executable, and that called _Unwind_SetGR in the main executable as well, thus using the uninitialized table and abort()ing.