static struct pending *free_pendings;
+/* Non-zero if symtab has line number info. This prevents an otherwise empty
+ symtab from being tossed. */
+
+static int have_line_numbers;
\f
static int
compare_line_numbers PARAMS ((const void *, const void *));
{
register struct pending *link;
- /* If this is a reference to/live alias for another symbol, don't add it.
- We don't want to be able to look up the live references directly. */
+ /* If this is an alias for another symbol, don't add it. */
if (symbol->ginfo.name && symbol->ginfo.name[0] == '#')
return;
xmalloc (sizeof (struct linetable)
+ subfile->line_vector_length * sizeof (struct linetable_entry));
subfile->line_vector->nitems = 0;
+ have_line_numbers = 1;
}
if (subfile->line_vector->nitems + 1 >= subfile->line_vector_length)
file_symbols = NULL;
global_symbols = NULL;
within_function = 0;
+ have_line_numbers = 0;
/* Context stack is initially empty. Allocate first one with room for
10 levels; reuse it forever afterward. */
if (pending_blocks == NULL
&& file_symbols == NULL
- && global_symbols == NULL)
+ && global_symbols == NULL
+ && have_line_numbers == 0)
{
/* Ignore symtabs that have no functions with real debugging info */
blockvector = NULL;