From a11d7ba33e9b91147e7f1a5c827a5804d098f523 Mon Sep 17 00:00:00 2001 From: Sean Eric Fagan Date: Tue, 11 Feb 1992 23:15:03 +0000 Subject: [PATCH] Updating gprof for latest bfd stuff, and making configure work. --- gprof/configure.in | 18 ++++++++++++++++++ gprof/gprof.c | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/gprof/configure.in b/gprof/configure.in index 107cd6a409e..f634baee9e2 100644 --- a/gprof/configure.in +++ b/gprof/configure.in @@ -7,8 +7,26 @@ srctrigger=gprof.c srcname="gprof" # per-host: +case "${host_cpu}" in +sparc*) my_host=sparc ;; +i386*) my_host=i386 ;; +esac + +host_makefile_frag=config/mh-${my_host} +if [ ! -f ${srcdir}/${host_makefile_frag} ] ; then + host_makefile_frag= +fi # per-target: +case "${target_cpu}" in +sparc*) my_target=sparc ;; +i386*) my_target=i386 ;; +esac + +target_makefile_frag=config/mt-${my_target} +if [ ! -f ${srcdir}/${target_makefile_frag} ] ; then + target_makefile_frag= +fi files= links= diff --git a/gprof/gprof.c b/gprof/gprof.c index 94f7f98ba2e..9c4701c8cca 100644 --- a/gprof/gprof.c +++ b/gprof/gprof.c @@ -319,16 +319,16 @@ gettextspace( abfd ) return; } - textspace = (u_char *) malloc( texsec->size ); + textspace = (u_char *) malloc( texsec->_cooked_size ); if ( textspace == 0 ) { fprintf( stderr , "%s: ran out room for %d bytes of text space: " , - whoami , texsec->size); + whoami , texsec->_cooked_size); fprintf( stderr , "can't do -c\n" ); return; } bfd_get_section_contents (abfd, texsec, textspace, texsec->filepos, - texsec->size); + texsec->_cooked_size); } /* * information from a gmon.out file is in two parts: -- 2.30.2