From 546cb2d85eddba4f56dfbcb0288db68243e3a0fd Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 5 May 2020 16:16:03 +0100 Subject: Restore readelf's warnings that describe real problems with the file being examined. Fix bug displaying empty file name tables. binutils* dwarf.c (do_checks): New global variable. (display_formatted_table): Warn about an unexpected number of columns in the table, if checks are enabled. Do not complain about the lack of data following the number of entries in the table if the table is empty. (display_debug_lines_decoded): Only warn about an unexpected number of columns in a table if checks are enabled. * dwarf.h (do_checks): Add a prototype. * elfcomm.c (error): Remove weak attribute. (warn): Likewise. * readelf.c (do_checks): Delete. (warn): Delete. (process_section_headers): Only warn about empty sections if checks are enabled. gas * dwarf2dbg.c (out_dir_and_file_list): Add comments describing the construction of a DWARF-5 directory name table. * testsuite/gas/elf/pr25917.d: Update expected output. --- binutils/elfcomm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'binutils/elfcomm.h') diff --git a/binutils/elfcomm.h b/binutils/elfcomm.h index abc7611fe3f..abf84b5cb9e 100644 --- a/binutils/elfcomm.h +++ b/binutils/elfcomm.h @@ -26,8 +26,8 @@ #include "aout/ar.h" -void error (const char *, ...) ATTRIBUTE_PRINTF_1; -void warn (const char *, ...) ATTRIBUTE_PRINTF_1; +extern void error (const char *, ...) ATTRIBUTE_PRINTF_1; +extern void warn (const char *, ...) ATTRIBUTE_PRINTF_1; typedef unsigned HOST_WIDEST_INT elf_vma; -- cgit v1.2.1