From 34d449df7931b018a6c40ed769dd5ee7480a16c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Barna=C5=9B?= Date: Wed, 10 Nov 2021 16:32:08 +0100 Subject: [PATCH] linker: add DWARF-5 debug sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DWARF-5 standard replaced the location list (.debug_loc) and range list (.debug_ranges) sections with new sections (.debug_loclists and .debug_rnglists). They weren't handled which resulted in many orphan sections reported as warnings by linker. Signed-off-by: Michał Barnaś --- include/linker/debug-sections.ld | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linker/debug-sections.ld b/include/linker/debug-sections.ld index e0e14baa086..e768801b7c7 100644 --- a/include/linker/debug-sections.ld +++ b/include/linker/debug-sections.ld @@ -41,3 +41,7 @@ SECTION_PROLOGUE(.debug_ranges, 0,) { *(.debug_ranges) } /* DWARF Extension. */ SECTION_PROLOGUE(.debug_macro, 0,) { *(.debug_macro) } + /* DWARF 5 */ + SECTION_PROLOGUE(.debug_line_str, 0,) { *(.debug_line_str) } + SECTION_PROLOGUE(.debug_loclists, 0,) { *(.debug_loclists) } + SECTION_PROLOGUE(.debug_rnglists, 0,) { *(.debug_rnglists) }