]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix initiali state of DWARF v5 line number table in BFD library
authorNick Clifton <nickc@redhat.com>
Mon, 29 Apr 2024 09:03:56 +0000 (10:03 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 29 Apr 2024 09:04:53 +0000 (10:04 +0100)
  PR 30783

bfd/dwarf2.c
ld/testsuite/ld-x86-64/pr27587.err

index 8eb7b11e1cad0a6374898d7ffd329b71ae8bf0ee..151ed0237ca025d114a37b7e2e2decd6ac73c193 100644 (file)
@@ -2916,10 +2916,9 @@ decode_line_info (struct comp_unit *unit)
 
       if (table->num_files)
        {
-         if (table->use_dir_and_file_0)
-           filename = concat_filename (table, 0);
-         else
-           filename = concat_filename (table, 1);
+         /* PR 30783: Always start with a file index of 1, even
+            for DWARF-5.  */
+         filename = concat_filename (table, 1);
        }
 
       /* Decode the table.  */
index 9ccca0aec382516a7d5a19f1e7a682a2150c1813..b5c6fbaffa53d7ec41e395836beecf555dfcf041 100644 (file)
@@ -1,3 +1,3 @@
 #...
-.*pr27587/<artificial>:4:\(.*\): undefined reference to `stack_size'
+.*pr27587/pr27587.i:4:\(.*\): undefined reference to `stack_size'
 #...