File binutils-2.20-linker_script.patch of Package djgpp-binutils
--- binutils-2.17/ld/scripttempl/i386go32.sc.llinkscript 2002-09-23 14:36:15.000000000 +0300
+++ binutils-2.17/ld/scripttempl/i386go32.sc 2007-03-25 18:15:06.000000000 +0300
@@ -35,14 +35,23 @@
${RELOCATING+djgpp_first_ctor = . ;
*(SORT(.ctors.*))
*(.ctor)
+ *(.ctors)
djgpp_last_ctor = . ;}
${RELOCATING+djgpp_first_dtor = . ;
*(SORT(.dtors.*))
*(.dtor)
+ *(.dtors)
djgpp_last_dtor = . ;}
+ __environ = . ;
+ PROVIDE(_environ = .) ;
+ LONG(0) ;
*(.data)
${RELOCATING+*(.data.*)}
+ /* Ugly workaround to prevent entire .bss to have attribute CONTENT */
+ /* for C++ executables. */
+ *(${RELOCATING+ .bss.*})
+
${RELOCATING+*(.gcc_exc*)}
${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
${RELOCATING+*(.eh_fram*)}
@@ -57,7 +66,7 @@
${CONSTRUCTING+${RELOCATING-$DTOR}}
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{
- *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
+ *(.bss${RELOCATING+ .gnu.linkonce.b.*})
*(COMMON)
${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}