[COMMITTED] elflint: Handle .debug_line_str as .debug_str

Mark Wielaard mark@klomp.org
Fri Sep 4 23:23:14 GMT 2020


The new DWARF5 .debug_line_str is identical to the .debug_str section.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 src/ChangeLog | 4 ++++
 src/elflint.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index 8eb2103d..e37f3587 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2020-09-04  Mark Wielaard  <mark@klomp.org>
+
+	* elflint.c (special_sections): Add .debug_line_str.
+
 2020-08-26  Mark Wielaard  <mark@klomp.org>
 
 	* readelf.c (print_debug_line_section): It is not an error if there
diff --git a/src/elflint.c b/src/elflint.c
index 9cdcccca..ef3e3732 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -3631,6 +3631,7 @@ static const struct
     { ".data", 6, SHT_PROGBITS, exact, SHF_ALLOC | SHF_WRITE, 0 },
     { ".data1", 7, SHT_PROGBITS, exact, SHF_ALLOC | SHF_WRITE, 0 },
     { ".debug_str", 11, SHT_PROGBITS, exact_or_gnuld, SHF_MERGE | SHF_STRINGS, 0 },
+    { ".debug_line_str", 16, SHT_PROGBITS, exact_or_gnuld, SHF_MERGE | SHF_STRINGS, 0 },
     { ".debug", 6, SHT_PROGBITS, exact, 0, 0 },
     { ".dynamic", 9, SHT_DYNAMIC, atleast, SHF_ALLOC, SHF_WRITE },
     { ".dynstr", 8, SHT_STRTAB, exact, SHF_ALLOC, 0 },
-- 
2.18.4



More information about the Elfutils-devel mailing list