Stop bogus warnings about DWARF indexed string offsets being too big.

* dwarf.c (fetch_indexed_string): Do not use length of first table
	in string section as the length of every table in the section.
	* testsuite/binutils-all/pr26112.r: Update expected output.
This commit is contained in:
Nick Clifton
2022-06-27 11:48:24 +01:00
parent 2135495484
commit a3f1431a50
3 changed files with 26 additions and 75 deletions

View File

@ -6,8 +6,10 @@ Contents of the .debug_macro section:
Offset into .debug_line: 0x0
DW_MACRO_start_file - lineno: 0 filenum: 1
DW_MACRO_define_strx lineno : 1 macro : FOO bar
DW_MACRO_define_strx lineno : 1 macro : -
DW_MACRO_end_file
DW_MACRO_define_strx lineno : 0 macro : /home/tstellar/llvm-project/clang-build
DW_MACRO_define_strx lineno : 0 macro : FOO bar
DW_MACRO_define_strx lineno : 0 macro : __llvm__ 1
DW_MACRO_define_strx lineno : 0 macro : __clang__ 1
DW_MACRO_define_strx lineno : 0 macro : __clang_major__ 11
@ -346,5 +348,3 @@ Contents of the .debug_macro section:
DW_MACRO_define_strx lineno : 0 macro : __STDC__ 1
DW_MACRO_define_strx lineno : 0 macro : __STDC_HOSTED__ 1
DW_MACRO_define_strx lineno : 0 macro : __STDC_VERSION__ 201710L
DW_MACRO_define_strx lineno : 0 macro : __STDC_UTF_16__ 1
DW_MACRO_define_strx lineno : 0 macro : __STDC_UTF_32__ 1