public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Kai Tietz <Kai.Tietz@onevision.com>
To: Kai Tietz <Kai.Tietz@onevision.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [patch ld]: Add dwarf 4 section description for PE and PE+.
Date: Thu, 04 Nov 2010 15:27:00 -0000	[thread overview]
Message-ID: <OF76C6EC1E.3A9E2EC2-ONC12577D1.00547772-C12577D1.0054DF4D@onevision.de> (raw)
In-Reply-To: <OF38B361F9.97B2225E-ONC12577D1.00526C0C-C12577D1.0052D373@onevision.de>

[-- 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;

  reply	other threads:[~2010-11-04 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04 15:05 Kai Tietz
2010-11-04 15:27 ` Kai Tietz [this message]
2010-11-04 15:47   ` Dave Korn
2010-11-04 16:04     ` Kai Tietz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF76C6EC1E.3A9E2EC2-ONC12577D1.00547772-C12577D1.0054DF4D@onevision.de \
    --to=kai.tietz@onevision.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).