aboutsummaryrefslogtreecommitdiff
path: root/gprof/gprof.c
diff options
context:
space:
mode:
Diffstat (limited to 'gprof/gprof.c')
-rw-r--r--gprof/gprof.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/gprof/gprof.c b/gprof/gprof.c
index 9392575..cea269b 100644
--- a/gprof/gprof.c
+++ b/gprof/gprof.c
@@ -527,17 +527,6 @@ This program is free software. This program has absolutely no warranty.\n"));
if (ignore_direct_calls)
core_get_text_space (core_bfd);
- /* Create symbols from core image. */
- if (external_symbol_table)
- core_create_syms_from (external_symbol_table);
- else if (line_granularity)
- core_create_line_syms ();
- else
- core_create_function_syms ();
-
- /* Translate sym specs into syms. */
- sym_id_parse ();
-
if (file_format == FF_PROF)
{
fprintf (stderr,
@@ -644,6 +633,23 @@ This program is free software. This program has absolutely no warranty.\n"));
return 0;
}
+/* Initialize the symbol table. */
+
+void
+symtab_init (void)
+{
+ /* Create symbols from core image. */
+ if (external_symbol_table)
+ core_create_syms_from (external_symbol_table);
+ else if (line_granularity)
+ core_create_line_syms ();
+ else
+ core_create_function_syms ();
+
+ /* Translate sym specs into syms. */
+ sym_id_parse ();
+}
+
void
done (int status)
{