[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems when linking against the profiled libc




When invoking the following command:

gcc -Wall -o mptest -L. test_multi_parallel.o -lfcs -lm -pg -lc_p

I get the following error:

gcc -Wall -o mptest -L. test_multi_parallel.o -lfcs -lm -pg -lc_p
/usr/bin/ld-real: /lib/ld-linux.so.2: indirect symbol
`__libc_internal_tsd_set'
to `__libc_internal_tsd_set@@GLIBC_2.0' is a loop
/lib/ld-linux.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [mptest] Error 1

I debugged ld and checked its command line. FYI, it is:

 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o
mptest /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../gcrt1.o
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../crti.o
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/crtbegin.o -L.
-L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96
-L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../..
test_multi_parallel.o
-lfcs -lm -lgcc -lc_p -lgcc
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/crtend.o
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../crtn.o

And this too generates this error.

I checked that the problem persists with the command:
gcc test.c -pg -lc_p

Where test.c is the hello world program.

Can anybody tell me how to overcome it, because I really want profiling
info for the libc functions.

Regards,

	Shlomi Fish


----------------------------------------------------------------------
Shlomi Fish        shlomif@t2.technion.ac.il
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       shlomif@techie.com

If:
1. A is A
2. A is not not-A
does it imply that
1. B is B
2. B is not not-B


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il