public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add DWARF 5 debug sections to PE* scripts.
       [not found] <20210218174349.797-1-ssbssa.ref@yahoo.de>
@ 2021-02-18 17:43 ` Hannes Domani
  2021-02-18 19:33   ` Fangrui Song
       [not found]   ` <MWHPR1201MB0110EE37FEF63B1C2D3954CDCB859@MWHPR1201MB0110.namprd12.prod.outlook.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Hannes Domani @ 2021-02-18 17:43 UTC (permalink / raw)
  To: binutils

ld/ChangeLog:

2021-02-18  Hannes Domani  <ssbssa@yahoo.de>

	PR binutils/27268
	* scripttempl/pe.sc: Add DWARF 5 sections.
	* scripttempl/pep.sc: Likewise.
---
 ld/scripttempl/pe.sc  | 82 ++++++++++++++++++++++++++++++++++++++-----
 ld/scripttempl/pep.sc | 82 ++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 146 insertions(+), 18 deletions(-)

diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc
index 4617c05ff0c..3917194d3ef 100644
--- a/ld/scripttempl/pe.sc
+++ b/ld/scripttempl/pe.sc
@@ -410,15 +410,6 @@ SECTIONS
     *(.zdebug_varnames)
   }
 
-  .debug_macro ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
-  {
-    *(.debug_macro)
-  }
-  .zdebug_macro ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
-  {
-    *(.zdebug_macro)
-  }
-
   /* DWARF 3.  */
   .debug_ranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
   {
@@ -439,6 +430,79 @@ SECTIONS
     *(.zdebug_types${RELOCATING+ .gnu.linkonce.wt.*})
   }
 
+  /* DWARF 5.  */
+  .debug_addr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_addr)
+  }
+  .zdebug_addr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_addr)
+  }
+
+  .debug_line_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_line_str)
+  }
+  .zdebug_line_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_line_str)
+  }
+
+  .debug_loclists ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_loclists)
+  }
+  .zdebug_loclists ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_loclists)
+  }
+
+  .debug_macro ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_macro)
+  }
+  .zdebug_macro ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_macro)
+  }
+
+  .debug_names ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_names)
+  }
+  .zdebug_names ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_names)
+  }
+
+  .debug_rnglists ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_rnglists)
+  }
+  .zdebug_rnglists ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_rnglists)
+  }
+
+  .debug_str_offsets ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_str_offsets)
+  }
+  .zdebug_str_offsets ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_str_offsets)
+  }
+
+  .debug_sup ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_sup)
+  }
+  .zdebug_sup ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_sup)
+  }
+
   /* For Go and Rust.  */
   .debug_gdb_scripts ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
   {
diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc
index 7363205bab7..d6b1c51fbd6 100644
--- a/ld/scripttempl/pep.sc
+++ b/ld/scripttempl/pep.sc
@@ -415,15 +415,6 @@ SECTIONS
     *(.zdebug_varnames)
   }
 
-  .debug_macro ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
-  {
-    *(.debug_macro)
-  }
-  .zdebug_macro ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
-  {
-    *(.zdebug_macro)
-  }
-
   /* DWARF 3.  */
   .debug_ranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
   {
@@ -444,6 +435,79 @@ SECTIONS
     *(.zdebug_types${RELOCATING+ .zdebug.gnu.linkonce.wt.*})
   }
 
+  /* DWARF 5.  */
+  .debug_addr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_addr)
+  }
+  .zdebug_addr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_addr)
+  }
+
+  .debug_line_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_line_str)
+  }
+  .zdebug_line_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_line_str)
+  }
+
+  .debug_loclists ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_loclists)
+  }
+  .zdebug_loclists ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_loclists)
+  }
+
+  .debug_macro ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_macro)
+  }
+  .zdebug_macro ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_macro)
+  }
+
+  .debug_names ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_names)
+  }
+  .zdebug_names ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_names)
+  }
+
+  .debug_rnglists ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_rnglists)
+  }
+  .zdebug_rnglists ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_rnglists)
+  }
+
+  .debug_str_offsets ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_str_offsets)
+  }
+  .zdebug_str_offsets ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_str_offsets)
+  }
+
+  .debug_sup ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_sup)
+  }
+  .zdebug_sup ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_sup)
+  }
+
   /* For Go and Rust.  */
   .debug_gdb_scripts ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
   {
-- 
2.30.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add DWARF 5 debug sections to PE* scripts.
  2021-02-18 17:43 ` [PATCH] Add DWARF 5 debug sections to PE* scripts Hannes Domani
@ 2021-02-18 19:33   ` Fangrui Song
       [not found]   ` <MWHPR1201MB0110EE37FEF63B1C2D3954CDCB859@MWHPR1201MB0110.namprd12.prod.outlook.com>
  1 sibling, 0 replies; 3+ messages in thread
From: Fangrui Song @ 2021-02-18 19:33 UTC (permalink / raw)
  To: Hannes Domani; +Cc: binutils

On Thu, Feb 18, 2021 at 9:43 AM Hannes Domani via Binutils
<binutils@sourceware.org> wrote:
>
> ld/ChangeLog:
>
> 2021-02-18  Hannes Domani  <ssbssa@yahoo.de>
>
>         PR binutils/27268
>         * scripttempl/pe.sc: Add DWARF 5 sections.
>         * scripttempl/pep.sc: Likewise.
> ---
>  ld/scripttempl/pe.sc  | 82 ++++++++++++++++++++++++++++++++++++++-----
>  ld/scripttempl/pep.sc | 82 ++++++++++++++++++++++++++++++++++++++-----
>  2 files changed, 146 insertions(+), 18 deletions(-)

We may not need .zdebug_* as zlib-gnu has been obsoleted.
.debug_sup is not used by linkers, so is technically not needed as well.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add DWARF 5 debug sections to PE* scripts.
       [not found]   ` <MWHPR1201MB0110EE37FEF63B1C2D3954CDCB859@MWHPR1201MB0110.namprd12.prod.outlook.com>
@ 2021-02-24 11:45     ` Hannes Domani
  0 siblings, 0 replies; 3+ messages in thread
From: Hannes Domani @ 2021-02-24 11:45 UTC (permalink / raw)
  To: Fangrui Song; +Cc: binutils

 Am Donnerstag, 18. Februar 2021, 20:34:04 MEZ hat Fangrui Song <i@maskray.me> Folgendes geschrieben:

> On Thu, Feb 18, 2021 at 9:43 AM Hannes Domani via Binutils
>
> <binutils@sourceware.org> wrote:
> >
> > ld/ChangeLog:
> >
> > 2021-02-18  Hannes Domani  <ssbssa@yahoo.de>
> >
> >        PR binutils/27268
> >        * scripttempl/pe.sc: Add DWARF 5 sections.
> >        * scripttempl/pep.sc: Likewise.
> > ---
> >  ld/scripttempl/pe.sc  | 82 ++++++++++++++++++++++++++++++++++++++-----
> >  ld/scripttempl/pep.sc | 82 ++++++++++++++++++++++++++++++++++++++-----
> >  2 files changed, 146 insertions(+), 18 deletions(-)
>
>
> We may not need .zdebug_* as zlib-gnu has been obsoleted.

If the .zdebug_* are not needed anymore, they should probably be removed in
an extra commit.


> .debug_sup is not used by linkers, so is technically not needed as well.

Should I send a v2 without .debug_sup?


Hannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-24 11:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210218174349.797-1-ssbssa.ref@yahoo.de>
2021-02-18 17:43 ` [PATCH] Add DWARF 5 debug sections to PE* scripts Hannes Domani
2021-02-18 19:33   ` Fangrui Song
     [not found]   ` <MWHPR1201MB0110EE37FEF63B1C2D3954CDCB859@MWHPR1201MB0110.namprd12.prod.outlook.com>
2021-02-24 11:45     ` Hannes Domani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).