This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch PE]: Put .eh_frame in its own section
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils at sourceware dot org
- Date: Wed, 1 Jul 2009 15:12:31 +0200
- Subject: [Patch PE]: Put .eh_frame in its own section
Hi,
the idea of this patch was already discussed: move .eh_frame into its
own section (instead of .rdata) so that GDB can use it to do its
unwinding. This is very useful for x86_64.
Reg-tested on: i386-pc-mingw32 i386-pc-cygwin and x86_64-pc-mingw32
Tristan.
ld/
2009-07-01 Tristan Gingold <gingold@adacore.com>
* scripttempl/pep.sc: Put .eh_frame in its own section.
* scripttempl/pe.sc: Ditto.
Index: scripttempl/pe.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/pe.sc,v
retrieving revision 1.19
diff -c -p -r1.19 pe.sc
*** scripttempl/pe.sc 27 Jun 2009 08:57:08 -0000 1.19
--- scripttempl/pe.sc 1 Jul 2009 13:12:00 -0000
*************** SECTIONS
*** 102,108 ****
.rdata ${RELOCATING+BLOCK(__section_alignment__)} :
{
${R_RDATA}
- ${RELOCATING+ *(.eh_frame)}
${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
*(.rdata_runtime_pseudo_reloc)
--- 102,107 ----
*************** SECTIONS
*** 110,115 ****
--- 109,119 ----
${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
}
+ .eh_frame ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.eh_frame)
+ }
+
.pdata ${RELOCATING+BLOCK(__section_alignment__)} :
{
*(.pdata)
Index: scripttempl/pep.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/pep.sc,v
retrieving revision 1.7
diff -c -p -r1.7 pep.sc
*** scripttempl/pep.sc 27 Jun 2009 08:57:08 -0000 1.7
--- scripttempl/pep.sc 1 Jul 2009 13:12:00 -0000
*************** SECTIONS
*** 103,109 ****
.rdata ${RELOCATING+BLOCK(__section_alignment__)} :
{
${R_RDATA}
- ${RELOCATING+ *(.eh_frame)}
${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
*(.rdata_runtime_pseudo_reloc)
--- 103,108 ----
*************** SECTIONS
*** 111,116 ****
--- 110,120 ----
${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
}
+ .eh_frame ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.eh_frame)
+ }
+
.pdata ${RELOCATING+BLOCK(__section_alignment__)} :
{
*(.pdata)