diff --git a/binutils/objdump.c b/binutils/objdump.c index 8b6021a20fe..944b81b17e0 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -160,7 +160,6 @@ static enum color_selection off; #endif -static int dump_any_debugging; static int demangle_flags = DMGL_ANSI | DMGL_PARAMS; /* This is reset to false each time we enter the disassembler, and set true @@ -4402,9 +4405,6 @@ load_debug_section (enum dwarf_section_display_enum debug, void *file) asection *sec; const char *name; - if (!dump_any_debugging) - return false; - /* If it is already loaded, do nothing. */ if (section->start != NULL) { @@ -5742,6 +5742,9 @@ might_need_separate_debug_info (bool is_mainfile) return true; if (process_links || dump_symtab || dump_debugging + /* Disassembly benefits from symbol tables, which might + be stored in the separate debug info file. */ + || disassemble || dump_dwarf_section_info || with_source_code) return true; @@ -6474,12 +6482,6 @@ main (int argc, char **argv) if (!seenflag) usage (stderr, 2); - dump_any_debugging = (dump_debugging - || dump_dwarf_section_info - || dump_global_vars - || process_links - || with_source_code); - if (formats_info) exit_status = display_info (); else