Subject: Re: can't profile on Shark
To: Ignatios Souvatzis <is@netbsd.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm
Date: 06/26/2003 10:33:15
> Hi,
> 
> marie dijk !% make
> cc -O2 -Wstrict-prototypes -Wmissing-prototypes -Werror  -pg  -c dijk.c
> cc -O2 -Wstrict-prototypes -Wmissing-prototypes -Werror  -pg  -c radixheap.c
> cc -pg  -o dijk  dijk.o radixheap.o 
> /usr/lib/libgcc_p.a(_fixunssfsi.po): In function `__fixunssfsi':
> _fixunssfsi.po(.text+0x24): undefined reference to `__gesf2'
> *** Error code 1
> 
> does anybody have an instant clue whats going on?
> 
> marie dijk !% uname -a
> NetBSD marie 1.6.1 NetBSD 1.6.1 (MARIE) #7: Tue May 20 20:18:41 CEST 2003     is@marie:/var/tmp/MARIE shark
> 
> Userland is matching.

This is because the libraries specified to ld are

	-lgcc_p -lc_p -lgcc_p

and libc_p is missing a __fixunssfsi function which is needed by gmon.o.  
libgcc_p (the second instance) provides it, but it doesn't provide 
__gesf2; and by that time it's too late to go back and search libc_p.a 
again.

I don't know why the gmon module needs to do FP arithmetic, I though it 
just wrote out the raw tables.

R.