ldd broken for profiling binaries?
Alexander Kabaev
kabaev at gmail.com
Mon May 28 22:53:35 UTC 2007
On Mon, 28 May 2007 21:18:57 +0300
Giorgos Keramidas <keramida at freebsd.org> wrote:
> ldd seems to be broken for profiling binaries, and the profiling
> binaries built with gcc42 seem to be unusable here:
>
> ,-----------------------------------------------------------------------
> | $ cat -n foo.c
> | 1 #include <stdio.h>
> | 2
> | 3 int
> | 4 main(void)
> | 5 {
> | 6 int k;
> | 7
> | 8 for (k = 0; k < 10000; k++)
> | 9 printf("Hello world\n");
> | 10 return 0;
> | 11 }
> | $ DEBUG_FLAGS='-pg' ; CFLAGS='' ; export DEBUG_FLAGS CFLAGS
> | $ make cleandir
> | rm -f foo foo.o
> | rm -f .depend GPATH GRTAGS GSYMS GTAGS
> | $ make cleandir
> | rm -f foo foo.o
> | rm -f .depend GPATH GRTAGS GSYMS GTAGS
> | $ make
> | Warning: Object directory not changed from original /tmp/foo
> | cc -pg -c foo.c
> | cc -pg -o foo foo.o
> | $ ./foo
> | /libexec/ld-elf.so.1: ./foo: Unexpected inconsistency: dependency
> libgcc_s.so.1 not found | $ ldd foo
> | foo:
> | /libexec/ld-elf.so.1: foo: Unexpected inconsistency: dependency
> libgcc_s.so.1 not found | foo: exit status 1
> | $
> `-----------------------------------------------------------------------
>
linker pulled in libgcc_s.so.1 symbols, but somehow managed not to
record dependency on lib. This might be a bug in binutils, but someone
needs to look close to be sure.
I think I'll disable shared libgcc for profiled builds for now.
--
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070528/f629f8a9/signature.pgp
More information about the freebsd-current
mailing list