From d1765f5db3f9d1c75a3e1b06f0182db40afbbdc9 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 29 Apr 2024 10:03:56 +0100 Subject: Fix initiali state of DWARF v5 line number table in BFD library PR 30783 --- bfd/dwarf2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bfd') diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 8eb7b11..151ed02 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -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. */ -- cgit v1.1