This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch ld]: Adding .gnu.linkonce.t.* section and adjust .gnu.linkonce.wi.* section for pe-coff targets
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Tue, 27 Sep 2011 14:36:02 +0200
- Subject: [patch ld]: Adding .gnu.linkonce.t.* section and adjust .gnu.linkonce.wi.* section for pe-coff targets
Hello,
this patch adds support for .gnu.linkonce.t.* section, which might be
generated by LTO for pe-coff targets. Additionally it takes care that
the .gnu.linkonce.wi.* sections getting only combined to .debug_info for
relocating linking.
2011-09-27 Kai Tietz <ktietz@redhat.com>
* scripttempl/pe.sc (.text): Add support for
.gnu.linkonce.t.* section.
(.debug_info): Only use .gnu.linkonce.wi.* for
relocating.
* scripttempl/pep.sc: Likewise.
Regression tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin.
Ok for apply?
Regards,
Kai
Index: ld/scripttempl/pe.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/pe.sc,v
retrieving revision 1.28
diff -u -r1.28 pe.sc
--- ld/scripttempl/pe.sc 6 Aug 2011 11:21:44 -0000 1.28
+++ ld/scripttempl/pe.sc 27 Sep 2011 11:21:52 -0000
@@ -73,6 +73,7 @@
*(.text)
${R_TEXT}
${RELOCATING+ *(.text.*)}
+ ${RELOCATING+ *(.gnu.linkonce.t.*)}
*(.glue_7t)
*(.glue_7)
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
@@ -238,7 +239,7 @@
/* DWARF 2. */
.debug_info ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
{
- *(.debug_info) *(.gnu.linkonce.wi.*)
+ *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*})
}
.debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
@@ -306,7 +307,7 @@
/* DWARF 4. */
.debug_types ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
{
- *(.debug_types) *(.gnu.linkonce.wt.*)
+ *(.debug_types${RELOCATING+ .gnu.linkonce.wt.*})
}
}
EOF
Index: ld/scripttempl/pep.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/pep.sc,v
retrieving revision 1.17
diff -u -r1.17 pep.sc
--- ld/scripttempl/pep.sc 6 Aug 2011 11:21:44 -0000 1.17
+++ ld/scripttempl/pep.sc 27 Sep 2011 11:21:52 -0000
@@ -73,6 +73,7 @@
*(.text)
${R_TEXT}
${RELOCATING+ *(.text.*)}
+ ${RELOCATING+ *(.gnu.linkonce.t.*)}
*(.glue_7t)
*(.glue_7)
${CONSTRUCTING+. = ALIGN(8);}
@@ -244,7 +245,7 @@
/* DWARF 2. */
.debug_info ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
{
- *(.debug_info) *(.gnu.linkonce.wi.*)
+ *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*})
}
.debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
@@ -312,7 +313,7 @@
/* DWARF 4. */
.debug_types ${RELOCATING+BLOCK(__section_alignment__)}
${RELOCATING+(NOLOAD)} :
{
- *(.debug_types) *(.gnu.linkonce.wt.*)
+ *(.debug_types${RELOCATING+ .gnu.linkonce.wt.*})
}
}
EOF