This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch bfd/binutils/ld]: Fix PR 14067 for x86/x64 pe-coff targets


Hi,

This patch fixes the bug 14067 by adding for x86 and x64 pe-coff
targets the compressed-debug-section feature.
There are two hunks within that patch, which are just nits I would
like to apply for pe-coff targets.

This patch is regression-tested for x86_64-w64-mingw32,
i686-w64-mingw32, and i686-pc-cygwin.  Ok for apply?

Regards,
Kai

ChangeLog bfd

2012-10-05  Kai Tietz

	PR binutils/14067
	* coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
	Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
	* coff-x86_64.c: Likewise.
	* coffcode.h (DOT_ZDEBUG): New define.
	(sec_to_styp_flags): Check for .zdebug.
	(styp_to_sec_flags): Likewise.
	* coffgen.c (make_a_section): Handle .debug_* section
	compression/decompression flags.
	* cofflink.c (mark_relocs): Ignore relocations
	for a section, which isn't marked as used.
	(_bfd_coff_link_input_bfd): Add support of compressed
	debug sections.
	* compress.c (decompress_contents): Loop as long
	as there is input available and there is room for
	output.
	* bfd/pe-arm.c: Add .zdebug_ partial match entry.
	* pe-i386.c: Likewise.
	* pe-x86_64.c: Likewise.
	* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
	data-directories as this might destroy content.

ChangeLog binutils

2012-10-05  Kai Tietz

	* objdump.c (dump_bfd): Call dump headers after
	call of slurp_symtab.

ChangeLog ld

2012-10-05  Kai Tietz

	PR binutils/14067
	* scripttempl/pep.sc: Add zdebug sections.
	* scripttempl/pe.sc: Likewise.

Index: bfd/coff-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-i386.c,v
retrieving revision 1.37
diff -u -p -r1.37 coff-i386.c
--- bfd/coff-i386.c	13 Jul 2012 14:22:43 -0000	1.37
+++ bfd/coff-i386.c	1 Oct 2012 14:54:24 -0000
@@ -625,13 +628,13 @@ const bfd_target

   (HAS_RELOC | EXEC_P |		/* object flags */
    HAS_LINENO | HAS_DEBUG |
-   HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+   HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS ),

   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
 #ifdef COFF_WITH_PE
-   | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY
+   | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY | SEC_DEBUGGING
 #endif
-   | SEC_CODE | SEC_DATA),
+   | SEC_CODE | SEC_DATA | SEC_EXCLUDE ),

 #ifdef TARGET_UNDERSCORE
   TARGET_UNDERSCORE,		/* leading underscore */
Index: bfd/coff-x86_64.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-x86_64.c,v
retrieving revision 1.15
diff -u -p -r1.15 coff-x86_64.c
--- bfd/coff-x86_64.c	16 Jan 2012 08:30:18 -0000	1.15
+++ bfd/coff-x86_64.c	1 Oct 2012 14:54:24 -0000
@@ -749,13 +749,13 @@ const bfd_target

   (HAS_RELOC | EXEC_P |		/* Object flags.  */
    HAS_LINENO | HAS_DEBUG |
-   HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+   HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),

   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags.  */
 #if defined(COFF_WITH_PE)
-   | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY
+   | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY | SEC_DEBUGGING
 #endif
-   | SEC_CODE | SEC_DATA),
+   | SEC_CODE | SEC_DATA | SEC_EXCLUDE ),

 #ifdef TARGET_UNDERSCORE
   TARGET_UNDERSCORE,		/* Leading underscore.  */
Index: bfd/coffcode.h
===================================================================
RCS file: /cvs/src/src/bfd/coffcode.h,v
retrieving revision 1.182
diff -u -p -r1.182 coffcode.h
--- bfd/coffcode.h	27 Sep 2011 16:03:49 -0000	1.182
+++ bfd/coffcode.h	1 Oct 2012 14:54:25 -0000
@@ -372,6 +372,7 @@ CODE_FRAGMENT
 #define STRING_SIZE_SIZE 4

 #define DOT_DEBUG	".debug"
+#define DOT_ZDEBUG	".zdebug"
 #define GNU_LINKONCE_WI ".gnu.linkonce.wi."
 #define GNU_LINKONCE_WT ".gnu.linkonce.wt."
 #define DOT_RELOC	".reloc"
@@ -545,7 +546,8 @@ sec_to_styp_flags (const char *sec_name,
       styp_flags = STYP_LIT;
 #endif /* _LIT */
     }
-  else if (CONST_STRNEQ (sec_name, DOT_DEBUG))
+  else if (CONST_STRNEQ (sec_name, DOT_DEBUG)
+           || CONST_STRNEQ (sec_name, DOT_ZDEBUG))
     {
       /* Handle the XCOFF debug section and DWARF2 debug sections.  */
       if (!sec_name[6])
@@ -652,6 +654,7 @@ sec_to_styp_flags (const char *sec_name,
   bfd_boolean is_dbg = FALSE;

   if (CONST_STRNEQ (sec_name, DOT_DEBUG)
+      || CONST_STRNEQ (sec_name, DOT_ZDEBUG)
 #ifdef COFF_LONG_SECTION_NAMES
       || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI)
       || CONST_STRNEQ (sec_name, GNU_LINKONCE_WT)
@@ -821,6 +824,7 @@ styp_to_sec_flags (bfd *abfd ATTRIBUTE_U
 	sec_flags |= SEC_ALLOC;
     }
   else if (CONST_STRNEQ (name, DOT_DEBUG)
+	   || CONST_STRNEQ (name, DOT_ZDEBUG)
 #ifdef _COMMENT
 	   || strcmp (name, _COMMENT) == 0
 #endif
@@ -1158,6 +1162,7 @@ styp_to_sec_flags (bfd *abfd,
   bfd_boolean is_dbg = FALSE;

   if (CONST_STRNEQ (name, DOT_DEBUG)
+      || CONST_STRNEQ (name, DOT_ZDEBUG)
 #ifdef COFF_LONG_SECTION_NAMES
       || CONST_STRNEQ (name, GNU_LINKONCE_WI)
       || CONST_STRNEQ (name, GNU_LINKONCE_WT)
Index: bfd/coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.84
diff -u -p -r1.84 coffgen.c
--- bfd/coffgen.c	24 Jul 2012 21:06:57 -0000	1.84
+++ bfd/coffgen.c	1 Oct 2012 14:54:25 -0000
@@ -146,6 +146,76 @@ make_a_section_from_file (bfd *abfd,
   if (hdr->s_scnptr != 0)
     return_section->flags |= SEC_HAS_CONTENTS;

+  /* Compress/decompress DWARF debug sections with names: .debug_* and
+     .zdebug_*, after the section flags is set.  */
+  if ((flags & SEC_DEBUGGING)
+      && ((name[1] == 'd' && name[6] == '_')
+	  || (name[1] == 'z' && name[7] == '_')))
+    {
+      enum { nothing, compress, decompress } action = nothing;
+      char *new_name = NULL;
+
+      if (bfd_is_section_compressed (abfd, return_section))
+	{
+	  /* Compressed section.  Check if we should decompress.  */
+	  if ((abfd->flags & BFD_DECOMPRESS))
+	    action = decompress;
+	}
+      else if (!bfd_is_section_compressed (abfd, return_section))
+	{
+	  /* Normal section.  Check if we should compress.  */
+	  if ((abfd->flags & BFD_COMPRESS) && return_section->size != 0)
+	    action = compress;
+	}
+
+      switch (action)
+	{
+	case nothing:
+	  break;
+	case compress:
+	  if (!bfd_init_section_compress_status (abfd, return_section))
+	    {
+	      (*_bfd_error_handler)
+		(_("%B: unable to initialize compress status for section %s"),
+		 abfd, name);
+	      return FALSE;
+	    }
+	  if (name[1] != 'z')
+	    {
+	      unsigned int len = strlen (name);
+
+	      new_name = bfd_alloc (abfd, len + 2);
+	      if (new_name == NULL)
+		return FALSE;
+	      new_name[0] = '.';
+	      new_name[1] = 'z';
+	      memcpy (new_name + 2, name + 1, len);
+	    }
+	  break;
+	case decompress:
+	  if (!bfd_init_section_decompress_status (abfd, return_section))
+	    {
+	      (*_bfd_error_handler)
+		(_("%B: unable to initialize decompress status for section %s"),
+		 abfd, name);
+	      return FALSE;
+	    }
+	  if (name[1] == 'z')
+	    {
+	      unsigned int len = strlen (name);
+
+	      new_name = bfd_alloc (abfd, len);
+	      if (new_name == NULL)
+		return FALSE;
+	      new_name[0] = '.';
+	      memcpy (new_name + 1, name + 2, len - 1);
+	    }
+	  break;
+	}
+      if (new_name != NULL)
+	bfd_rename_section (abfd, return_section, new_name);
+    }
+
   return result;
 }

Index: bfd/cofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/cofflink.c,v
retrieving revision 1.82
diff -u -p -r1.82 cofflink.c
--- bfd/cofflink.c	13 Jul 2012 14:22:45 -0000	1.82
+++ bfd/cofflink.c	1 Oct 2012 14:54:25 -0000
@@ -1424,7 +1424,8 @@ mark_relocs (struct coff_final_link_info
       struct internal_reloc *	irel;
       struct internal_reloc *	irelend;

-      if ((a->flags & SEC_RELOC) == 0 || a->reloc_count  < 1)
+      if ((a->flags & SEC_RELOC) == 0 || a->reloc_count  < 1
+	  || a->linker_mark == 0)
 	continue;
       /* Don't mark relocs in excluded sections.  */
       if (a->output_section == bfd_abs_section_ptr)
@@ -2426,10 +2427,9 @@ _bfd_coff_link_input_bfd (struct coff_fi
 	contents = secdata->contents;
       else
 	{
-	  bfd_size_type x = o->rawsize ? o->rawsize : o->size;
-	  if (! bfd_get_section_contents (input_bfd, o, flaginfo->contents, 0, x))
-	    return FALSE;
 	  contents = flaginfo->contents;
+	  if (! bfd_get_full_section_contents (input_bfd, o, &contents))
+	    return FALSE;
 	}

       if ((o->flags & SEC_RELOC) != 0)
@@ -2447,7 +2447,8 @@ _bfd_coff_link_input_bfd (struct coff_fi
 			       ? (flaginfo->section_info[target_index].relocs
 				  + o->output_section->reloc_count)
 			       : flaginfo->internal_relocs)));
-	  if (internal_relocs == NULL)
+	  if (internal_relocs == NULL
+	      && o->reloc_count > 0)
 	    return FALSE;

 	  /* Run through the relocs looking for relocs against symbols
Index: bfd/compress.c
===================================================================
RCS file: /cvs/src/src/bfd/compress.c,v
retrieving revision 1.12
diff -u -p -r1.12 compress.c
--- bfd/compress.c	17 May 2012 15:13:19 -0000	1.12
+++ bfd/compress.c	1 Oct 2012 14:54:26 -0000
@@ -46,7 +48,7 @@ decompress_contents (bfd_byte *compresse
   strm.avail_out = uncompressed_size;

   rc = inflateInit (&strm);
-  while (strm.avail_in > 0)
+  while (strm.avail_in > 0 && strm.avail_out > 0)
     {
       if (rc != Z_OK)
 	return FALSE;
Index: bfd/pe-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/pe-arm.c,v
retrieving revision 1.14
diff -u -p -r1.14 pe-arm.c
--- bfd/pe-arm.c	2 Sep 2009 07:18:37 -0000	1.14
+++ bfd/pe-arm.c	1 Oct 2012 14:54:26 -0000
@@ -60,6 +60,8 @@
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
 { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".zdebug"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
 { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }

Index: bfd/pe-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/pe-i386.c,v
retrieving revision 1.15
diff -u -p -r1.15 pe-i386.c
--- bfd/pe-i386.c	2 Sep 2009 07:18:37 -0000	1.15
+++ bfd/pe-i386.c	1 Oct 2012 14:54:26 -0000
@@ -38,6 +38,8 @@
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
 { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".zdebug"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
 { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }

Index: bfd/pe-x86_64.c
===================================================================
RCS file: /cvs/src/src/bfd/pe-x86_64.c,v
retrieving revision 1.5
diff -u -p -r1.5 pe-x86_64.c
--- bfd/pe-x86_64.c	14 Sep 2010 20:40:39 -0000	1.5
+++ bfd/pe-x86_64.c	1 Oct 2012 14:54:26 -0000
@@ -52,6 +52,8 @@
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
 { COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".zdebug"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
 { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }

Index: bfd/peXXigen.c
===================================================================
RCS file: /cvs/src/src/bfd/peXXigen.c,v
retrieving revision 1.70
diff -u -p -r1.70 peXXigen.c
--- bfd/peXXigen.c	9 Apr 2011 16:06:00 -0000	1.70
+++ bfd/peXXigen.c	1 Oct 2012 14:54:26 -0000
@@ -591,9 +591,6 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, v

   extra->NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES;

-  /* First null out all data directory entries.  */
-  memset (extra->DataDirectory, 0, sizeof (extra->DataDirectory));
-
   add_data_entry (abfd, extra, 0, ".edata", ib);
   add_data_entry (abfd, extra, 2, ".rsrc", ib);
   add_data_entry (abfd, extra, 3, ".pdata", ib);
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.196
diff -u -p -r1.196 objdump.c
--- binutils/objdump.c	17 Aug 2012 02:43:21 -0000	1.196
+++ binutils/objdump.c	1 Oct 2012 14:54:27 -0000
@@ -3215,8 +3215,6 @@ dump_bfd (bfd *abfd)
     dump_target_specific (abfd);
   if (! dump_debugging_tags && ! suppress_bfd_header)
     putchar ('\n');
-  if (dump_section_headers)
-    dump_headers (abfd);

   if (dump_symtab
       || dump_reloc_info
@@ -3224,6 +3222,10 @@ dump_bfd (bfd *abfd)
       || dump_debugging
       || dump_dwarf_section_info)
     syms = slurp_symtab (abfd);
+
+  if (dump_section_headers)
+    dump_headers (abfd);
+
   if (dump_dynamic_symtab || dump_dynamic_reloc_info
       || (disassemble && bfd_get_dynamic_symtab_upper_bound (abfd) > 0))
     dynsyms = slurp_dynamic_symtab (abfd);
Index: ld/scripttempl/pep.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/pep.sc,v
retrieving revision 1.19
diff -u -p -r1.19 pep.sc
--- ld/scripttempl/pep.sc	7 Aug 2012 13:47:17 -0000	1.19
+++ ld/scripttempl/pep.sc	1 Oct 2012 14:54:30 -0000
@@ -237,89 +237,157 @@ SECTIONS
   {
     *(.debug_aranges)
   }
+  .zdebug_aranges ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_aranges)
+  }

   .debug_pubnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_pubnames)
   }
+  .zdebug_pubnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_pubnames)
+  }

   .debug_pubtypes ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_pubtypes)
   }
+  .zdebug_pubtypes ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_pubtypes)
+  }

   /* DWARF 2.  */
   .debug_info ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*})
   }
+  .zdebug_info ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_info${RELOCATING+ .zdebug.gnu.linkonce.wi.*})
+  }

   .debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_abbrev)
   }
+  .zdebug_abbrev ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_abbrev)
+  }

   .debug_line ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_line)
   }
+  .zdebug_line ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_line)
+  }

   .debug_frame ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_frame*)
   }
+  .zdebug_frame ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_frame*)
+  }

   .debug_str ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_str)
   }
+  .zdebug_str ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_str)
+  }

   .debug_loc ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_loc)
   }
+  .zdebug_loc ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_loc)
+  }

   .debug_macinfo ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_macinfo)
   }
+  .zdebug_macinfo ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_macinfo)
+  }

   /* SGI/MIPS DWARF 2 extensions.  */
   .debug_weaknames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_weaknames)
   }
+  .zdebug_weaknames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_weaknames)
+  }

   .debug_funcnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_funcnames)
   }
+  .zdebug_funcnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_funcnames)
+  }

   .debug_typenames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_typenames)
   }
+  .zdebug_typenames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_typenames)
+  }

   .debug_varnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_varnames)
   }
+  .zdebug_varnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.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)} :
   {
     *(.debug_ranges)
   }
+  .zdebug_ranges ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_ranges)
+  }

   /* DWARF 4.  */
   .debug_types ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_types${RELOCATING+ .gnu.linkonce.wt.*})
   }
+  .zdebug_types ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_types${RELOCATING+ .zdebug.gnu.linkonce.wt.*})
+  }
 }
 EOF
Index: ld/scripttempl/pe.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/pe.sc,v
retrieving revision 1.31
diff -u -p -r1.31 pe.sc
--- ld/scripttempl/pe.sc	17 Aug 2012 16:33:03 -0000	1.31
+++ ld/scripttempl/pe.sc	1 Oct 2012 18:25:09 -0000
@@ -232,89 +232,157 @@ SECTIONS
   {
     *(.debug_aranges)
   }
+  .zdebug_aranges ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_aranges)
+  }

   .debug_pubnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_pubnames)
   }
+  .zdebug_pubnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_pubnames)
+  }

   .debug_pubtypes ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_pubtypes)
   }
+  .zdebug_pubtypes ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_pubtypes)
+  }

   /* DWARF 2.  */
   .debug_info ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*})
   }
+  .zdebug_info ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_info${RELOCATING+ .zdebug.gnu.linkonce.wi.*})
+  }

   .debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_abbrev)
   }
+  .zdebug_abbrev ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_abbrev)
+  }

   .debug_line ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_line)
   }
+  .zdebug_line ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_line)
+  }

   .debug_frame ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_frame*)
   }
+  .zdebug_frame ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_frame*)
+  }

   .debug_str ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_str)
   }
+  .zdebug_str ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_str)
+  }

   .debug_loc ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_loc)
   }
+  .zdebug_loc ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_loc)
+  }

   .debug_macinfo ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_macinfo)
   }
+  .zdebug_macinfo ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_macinfo)
+  }

   /* SGI/MIPS DWARF 2 extensions.  */
   .debug_weaknames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_weaknames)
   }
+  .zdebug_weaknames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_weaknames)
+  }

   .debug_funcnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_funcnames)
   }
+  .zdebug_funcnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_funcnames)
+  }

   .debug_typenames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_typenames)
   }
+  .zdebug_typenames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_typenames)
+  }

   .debug_varnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_varnames)
   }
+  .zdebug_varnames ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.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)} :
   {
     *(.debug_ranges)
   }
+  .zdebug_ranges ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_ranges)
+  }

   /* DWARF 4.  */
   .debug_types ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
   {
     *(.debug_types${RELOCATING+ .gnu.linkonce.wt.*})
   }
+  .zdebug_types ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
+  {
+    *(.zdebug_types${RELOCATING+ .gnu.linkonce.wt.*})
+  }
 }
 EOF


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]