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

Re: -ffunction-sections and profiling



On Fri, Jun 17, 2005 at 12:00:29PM -0400, Camm Maguire wrote:
> Greetings!  gcl, maxima, acl2, and axiom on hppa all make use of the
> -ffunction-sections workaround to certain limitations in the linker
> which I don't fully understand.  This has worked well now for a long
> time.  The following issue has recently arisen:
> 
> gcc -c -g -Wall -DVOL=volatile -fsigned-char -pipe -pg -g -ffunction-sections -fPIC gcl_pcl_precom2.c
> cc1: warning: -ffunction-sections disabled; it makes profiling impossible
> 
> gcc -o raw_pcl_gcl  \
> 	-L.   -Wl,-Map raw_pcl_gcl_map   -lpcl_gcl -Wl,-T ../unixport/gcl.script   -lm  -pg -ldl -rdynamic -lc -lgclp 
> /usr/bin/ld: ./libpcl_gcl.a(gcl_pcl_precom2.o)(.text+0x40450): cannot reach 000009f4__mcount@@GLIBC_2.2+0, recompile with -ffunction-sections
> /usr/bin/ld: ./libpcl_gcl.a(gcl_pcl_precom2.o)(.text+0x40450): cannot handle R_PARISC_PCREL17F for _mcount@@GLIBC_2.2
> /usr/bin/ld: final link failed: Bad value
> collect2: ld returned 1 exit status
> 
> Can one not use gprof profiling on hppa?

Yes you *can* use gprof (and sprof).

I am unaware of the imcompatibilities with '-ffunction-sections' and
profiling. I imagined they could both work together.

I wonder if jda has a comment about how to reach certain functions
by means of more complex stubs?

c.



Reply to: