Thread (37 messages) 37 messages, 6 authors, 2021-02-03

Re: [PATCH v6 2/2] Kbuild: implement support for DWARF v5

From: Nick Desaulniers <hidden>
Date: 2021-01-29 22:08:37
Also in: linux-kbuild, lkml

On Fri, Jan 29, 2021 at 1:52 PM Fangrui Song [off-list ref] wrote:
On 2021-01-29, Nick Desaulniers wrote:
quoted
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 34b7e0d2346c..f8d5455cd87f 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -843,7 +843,11 @@
              .debug_types    0 : { *(.debug_types) }                 \
              /* DWARF 5 */                                           \
              .debug_macro    0 : { *(.debug_macro) }                 \
-              .debug_addr     0 : { *(.debug_addr) }
+              .debug_addr     0 : { *(.debug_addr) }                  \
+              .debug_line_str 0 : { *(.debug_line_str) }              \
+              .debug_loclists 0 : { *(.debug_loclists) }              \
+              .debug_rnglists 0 : { *(.debug_rnglists) }              \
+              .debug_str_offsets      0 : { *(.debug_str_offsets) }
Add .debug_names for -gdwarf-5 -gpubnames

The internal linker script of GNU ld 2.36 will have it.
https://sourceware.org/pipermail/binutils/2021-January/115064.html

(Compilers don't generate .debug_sup, I added to GNU ld just for
future-proof.).
If we don't use `-gpubnames`, do I need to future proof the kernel's
linker script? YAGNI? :-P

(Since I need to make changes anyways, ok, I will add it to be safe.
Thanks for the sugguestion).
-- 
Thanks,
~Nick Desaulniers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help