public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch ld]: Add dwarf 4 section description for PE and PE+.
@ 2010-11-04 15:05 Kai Tietz
  2010-11-04 15:27 ` Kai Tietz
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Tietz @ 2010-11-04 15:05 UTC (permalink / raw)
  To: Binutils

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

Hello,

as reported today an user is dwarf-4 emitting .gnu.linkonce.wt.* 
sub-sections, which should be placed into .debug_types (AFAIU). This patch 
adds those to scripttemplates for pe/pep.

ChangeLog

2010-11-04  Kai Tietz

        * scripttempl/pe.sc (.debug_types): New.
        * scripttempl/pep.sc: Likewise.

Ok for apply?

Regards,
Kai

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

[-- Attachment #2: dwarf4_dtypes.diff --]
[-- Type: application/octet-stream, Size: 929 bytes --]

Index: src/ld/scripttempl/pe.sc
===================================================================
--- src.orig/ld/scripttempl/pe.sc	2010-09-22 10:21:33.000000000 +0200
+++ src/ld/scripttempl/pe.sc	2010-11-04 15:58:51.164859700 +0100
@@ -294,5 +294,11 @@ SECTIONS
   {
     *(.debug_ranges)
   }
+
+  /* DWARF 4.  */
+  .debug_types ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_types) *(.gnu.linkonce.wt.*)
+  }
 }
 EOF
Index: src/ld/scripttempl/pep.sc
===================================================================
--- src.orig/ld/scripttempl/pep.sc	2010-09-22 10:21:33.000000000 +0200
+++ src/ld/scripttempl/pep.sc	2010-11-04 15:59:45.305831200 +0100
@@ -300,5 +300,11 @@ SECTIONS
   {
     *(.debug_ranges)
   }
+
+  /* DWARF 4.  */
+  .debug_types ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_types) *(.gnu.linkonce.wt.*)
+  }
 }
 EOF

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

* Re: [patch ld]: Add dwarf 4 section description for PE and PE+.
  2010-11-04 15:05 [patch ld]: Add dwarf 4 section description for PE and PE+ Kai Tietz
@ 2010-11-04 15:27 ` Kai Tietz
  2010-11-04 15:47   ` Dave Korn
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Tietz @ 2010-11-04 15:27 UTC (permalink / raw)
  To: Kai Tietz; +Cc: Binutils

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

binutils-owner@sourceware.org wrote on 04.11.2010 16:04:40:

> Hello,
> 
> as reported today an user is dwarf-4 emitting .gnu.linkonce.wt.* 
> sub-sections, which should be placed into .debug_types (AFAIU). This 
patch 
> adds those to scripttemplates for pe/pep.
> 
> ChangeLog
> 
> 2010-11-04  Kai Tietz
> 
>         * scripttempl/pe.sc (.debug_types): New.
>         * scripttempl/pep.sc: Likewise.
> 
> Ok for apply?
> 

I added to this patch the coffcode.h part in bfd

Additional ChangeLog

2010-11-04  Kai Tietz

        * coffcode.h (GNU_LINKONCE_WT): New.
        (sec_to_styp_flags): Add handling of new debug
        section.
        (styp_to_sec_flags): Likewise.

Tested for x86_64-w64-mingw32 and i686-pc-cygwin. Ok for apply?

Regards,
Kai


[-- Attachment #2: dwarf4_dtypes.diff --]
[-- Type: application/octet-stream, Size: 2553 bytes --]

Index: src/ld/scripttempl/pe.sc
===================================================================
--- src.orig/ld/scripttempl/pe.sc	2010-09-22 10:21:33.000000000 +0200
+++ src/ld/scripttempl/pe.sc	2010-11-04 15:58:51.164859700 +0100
@@ -294,5 +294,11 @@ SECTIONS
   {
     *(.debug_ranges)
   }
+
+  /* DWARF 4.  */
+  .debug_types ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_types) *(.gnu.linkonce.wt.*)
+  }
 }
 EOF
Index: src/ld/scripttempl/pep.sc
===================================================================
--- src.orig/ld/scripttempl/pep.sc	2010-09-22 10:21:33.000000000 +0200
+++ src/ld/scripttempl/pep.sc	2010-11-04 15:59:45.305831200 +0100
@@ -300,5 +300,11 @@ SECTIONS
   {
     *(.debug_ranges)
   }
+
+  /* DWARF 4.  */
+  .debug_types ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+  {
+    *(.debug_types) *(.gnu.linkonce.wt.*)
+  }
 }
 EOF
Index: src/bfd/coffcode.h
===================================================================
--- src.orig/bfd/coffcode.h	2010-11-02 11:06:12.000000000 +0100
+++ src/bfd/coffcode.h	2010-11-04 16:21:48.486174500 +0100
@@ -373,6 +373,7 @@ CODE_FRAGMENT
 
 #define DOT_DEBUG	".debug"
 #define GNU_LINKONCE_WI ".gnu.linkonce.wi."
+#define GNU_LINKONCE_WT ".gnu.linkonce.wt."
 #define DOT_RELOC	".reloc"
 
 #if defined (COFF_LONG_SECTION_NAMES)
@@ -557,7 +558,8 @@ sec_to_styp_flags (const char *sec_name,
       styp_flags = STYP_DEBUG_INFO;
     }
 #ifdef COFF_LONG_SECTION_NAMES
-  else if (CONST_STRNEQ (sec_name, GNU_LINKONCE_WI))
+  else if (CONST_STRNEQ (sec_name, GNU_LINKONCE_WI)
+  	   || CONST_STRNEQ (sec_name, GNU_LINKONCE_WT))
     {
       styp_flags = STYP_DEBUG_INFO;
     }
@@ -641,6 +643,7 @@ sec_to_styp_flags (const char *sec_name,
   if (CONST_STRNEQ (sec_name, DOT_DEBUG)
 #ifdef COFF_LONG_SECTION_NAMES
       || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI)
+      || CONST_STRNEQ (sec_name, GNU_LINKONCE_WT)
 #endif
       || CONST_STRNEQ (sec_name, ".stab"))
     is_dbg = TRUE;
@@ -799,6 +802,7 @@ styp_to_sec_flags (bfd *abfd ATTRIBUTE_U
 #endif
 #ifdef COFF_LONG_SECTION_NAMES
 	   || CONST_STRNEQ (name, GNU_LINKONCE_WI)
+	   || CONST_STRNEQ (name, GNU_LINKONCE_WT)
 #endif
 	   || CONST_STRNEQ (name, ".stab"))
     {
@@ -1132,6 +1136,7 @@ styp_to_sec_flags (bfd *abfd,
   if (CONST_STRNEQ (name, DOT_DEBUG)
 #ifdef COFF_LONG_SECTION_NAMES
       || CONST_STRNEQ (name, GNU_LINKONCE_WI)
+      || CONST_STRNEQ (name, GNU_LINKONCE_WT)
 #endif
       || CONST_STRNEQ (name, ".stab"))
     is_dbg = TRUE;

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

* Re: [patch ld]: Add dwarf 4 section description for PE and PE+.
  2010-11-04 15:27 ` Kai Tietz
@ 2010-11-04 15:47   ` Dave Korn
  2010-11-04 16:04     ` Kai Tietz
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Korn @ 2010-11-04 15:47 UTC (permalink / raw)
  To: Kai Tietz; +Cc: Binutils

On 04/11/2010 15:27, Kai Tietz wrote:

> I added to this patch the coffcode.h part in bfd
> 
> Additional ChangeLog
> 
> 2010-11-04  Kai Tietz
> 
>         * coffcode.h (GNU_LINKONCE_WT): New.
>         (sec_to_styp_flags): Add handling of new debug
>         section.
>         (styp_to_sec_flags): Likewise.
> 
> Tested for x86_64-w64-mingw32 and i686-pc-cygwin. Ok for apply?

  Yep, that's fine, thanks.

    cheers,
      DaveK

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

* Re: [patch ld]: Add dwarf 4 section description for PE and PE+.
  2010-11-04 15:47   ` Dave Korn
@ 2010-11-04 16:04     ` Kai Tietz
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Tietz @ 2010-11-04 16:04 UTC (permalink / raw)
  To: Dave Korn; +Cc: Kai Tietz, Binutils

2010/11/4 Dave Korn <dave.korn.cygwin@gmail.com>:
> On 04/11/2010 15:27, Kai Tietz wrote:
>
>> I added to this patch the coffcode.h part in bfd
>>
>> Additional ChangeLog
>>
>> 2010-11-04  Kai Tietz
>>
>>         * coffcode.h (GNU_LINKONCE_WT): New.
>>         (sec_to_styp_flags): Add handling of new debug
>>         section.
>>         (styp_to_sec_flags): Likewise.
>>
>> Tested for x86_64-w64-mingw32 and i686-pc-cygwin. Ok for apply?
>
>  Yep, that's fine, thanks.
>
>    cheers,
>      DaveK
>
>

Applied.

Thanks,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

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

end of thread, other threads:[~2010-11-04 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-04 15:05 [patch ld]: Add dwarf 4 section description for PE and PE+ Kai Tietz
2010-11-04 15:27 ` Kai Tietz
2010-11-04 15:47   ` Dave Korn
2010-11-04 16:04     ` Kai Tietz

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).