powerpc64 gprof
Alan Modra
amodra@bigpond.net.au
Thu Apr 14 10:32:00 GMT 2005
More information about the Binutils mailing list
Thu Apr 14 10:32:00 GMT 2005
- Previous message (by thread): Overriding a DT_SONAME
- Next message (by thread): [patch] VxWorks x86 shared library support.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Removing dot-symbols rendered gprof ineffective. This regenerates
code section dot-syms, allowing gprof to return sensible function info.
* corefile.c (core_init): Call bfd_get_synthetic_symtab.
Applying mainline and 2.16.
Index: gprof/corefile.c
===================================================================
RCS file: /cvs/src/src/gprof/corefile.c,v
retrieving revision 1.20
diff -u -p -r1.20 corefile.c
--- gprof/corefile.c 3 Mar 2005 12:05:12 -0000 1.20
+++ gprof/corefile.c 14 Apr 2005 09:23:09 -0000
@@ -142,6 +142,9 @@ void
core_init (const char *aout_name)
{
int core_sym_bytes;
+ asymbol *synthsyms;
+ long synth_count;
+
core_bfd = bfd_openr (aout_name, 0);
if (!core_bfd)
@@ -190,6 +193,23 @@ core_init (const char *aout_name)
done (1);
}
+ synth_count = bfd_get_synthetic_symtab (core_bfd, core_num_syms, core_syms,
+ 0, NULL, &synthsyms);
+ if (synth_count > 0)
+ {
+ asymbol **symp;
+ long new_size;
+ long i;
+
+ new_size = (core_num_syms + synth_count + 1) * sizeof (*core_syms);
+ core_syms = xrealloc (core_syms, new_size);
+ symp = core_syms + core_num_syms;
+ core_num_syms += synth_count;
+ for (i = 0; i < synth_count; i++)
+ *symp++ = synthsyms + i;
+ *symp = 0;
+ }
+
min_insn_size = 1;
offset_to_code = 0;
--
Alan Modra
IBM OzLabs - Linux Technology Centre
- Previous message (by thread): Overriding a DT_SONAME
- Next message (by thread): [patch] VxWorks x86 shared library support.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list