building up glibc with --enable-profile and then trying to use the resulting library like so: $ cat test.c main(){} $ gcc test.c -static -pg -lc_p -g results in a crash: $ gdb ./a.out (gdb) r Starting program: /home/vapier/test Program received signal SIGSEGV, Segmentation fault. 0x000000000042fecb in __mcount_internal () (gdb) bt #0 0x000000000042fecb in __mcount_internal () #1 0x000000000040dc04 in mcount () #2 0x0000000000000000 in ?? () (gdb) the crash seems to be because gmon/mcount.c uses atomic code which relies on the TLS descriptors being setup, but that doesnt happen until __libc_start_main. but since __libc_start_main itself (and other functions early on) calls mcount, we crash. crash is easily reproducible with current git and x86_64 or x86. it's been this way since at least glibc-2.6.1.
This is still the case with glibc 2.15 on x86-64