Description of Problem: When using gcc (either 2.96-81 or 2.96-85) to compile even a simple C test program against glibc-profile (2.2.2-10), the command "gcc -o test test.c -lc_p" hangs, while the ld process consumes 99% CPU time. Even the most simple "int main(void){return 0;}" test.c exhibits this behavior, and the presence or absence of the "-pg" flag (I admit, this is my first time using gprof in years) doesn't make a difference. How Reproducible: Every time. Steps to Reproduce: 1. echo "int main(void){return 0;}" > test.c 2. gcc -o test -pg test.c -lc_p & 3. top Actual Results: Expected Results: Additional Information:
You're trying to link in 2 different glibc's (one statical libc_p.a, one shared library). This cannot work. Use gcc -o test -static -profile -pg test.c (-profile will ensure libc_p.a is linked in).