+Fri Jun 6 23:47:42 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * scripttempl/pe.sc: Add zeroes after .idata$3 to mark the end of
+ the import list.
+
+Thu May 29 13:13:22 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Don't
+ crash if an output section has no BFD section.
+
+Fri May 23 15:23:25 1997 Fred Fish <fnf@cygnus.com>
+
+ * lexsup.c (ld_options): Add entry for the new "task-link" option.
+ (parse_args): Handle the "task-link" option.
+ (OPTION_TASK_LINK): Add define.
+
Wed May 21 17:44:15 1997 Ian Lance Taylor <ian@cygnus.com>
* ldmain.c (main): Correct check of fclose return value when
Thu May 15 11:35:29 1997 Nick Clifton <nickc@cygnus.com>
- * ldlang.c (lang_check): Add test of the return value from the
+ * ldlang.c (lang_check): Add test of the return value from the
call to bfd_merge_private_bfd_data().
Mon May 12 23:22:58 1997 Ian Lance Taylor <ian@cygnus.com>
# Linker script for PE.
-# These are substituted in as variables in order to get '}' in a shell
-# conditional expansion.
-INIT='.init : { *(.init) }'
-FINI='.fini : { *(.fini) }'
+
cat <<EOF
OUTPUT_FORMAT(${OUTPUT_FORMAT})
${LIB_SEARCH_DIRS}
SECTIONS
{
-
.text ${RELOCATING+ __image_base__ + __section_alignment__ } :
- {
- ${RELOCATING+ *(.init);}
- *(.text)
- ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1); *(.ctors); *(.ctor); LONG (0); }
- ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(.dtors); *(.dtor); LONG (0); }
- ${RELOCATING+ *(.fini);}
- ${RELOCATING+ *(.gcc_exc);}
- ${RELOCATING+ etext = .};
- }
+ {
+ ${RELOCATING+ *(.init)}
+ *(.text)
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1); *(.ctors); *(.ctor); LONG (0); }
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1); *(.dtors); *(.dtor); LONG (0); }
+ ${RELOCATING+ *(.fini)}
+ /* ??? Why is .gcc_exc here? */
+ ${RELOCATING+ *(.gcc_exc)}
+ ${RELOCATING+ etext = .;}
+ /* Grouped section support currently must be explicitly provided for
+ in the linker script. */
+ *(.text\$)
+ *(.gcc_except_table)
+ }
.bss BLOCK(__section_alignment__) :
- {
- __bss_start__ = . ;
- *(.bss) ;
- *(COMMON);
- __bss_end__ = . ;
- }
+ {
+ __bss_start__ = . ;
+ *(.bss)
+ *(COMMON)
+ __bss_end__ = . ;
+ }
.data BLOCK(__section_alignment__) :
- {
- __data_start__ = . ;
- *(.data);
- *(.data2);
- __data_end__ = . ;
- }
+ {
+ __data_start__ = . ;
+ *(.data)
+ *(.data2)
+ __data_end__ = . ;
+ /* Grouped section support currently must be explicitly provided for
+ in the linker script. */
+ *(.data\$)
+ }
.rdata BLOCK(__section_alignment__) :
- {
+ {
*(.rdata)
- ;
+ /* Grouped section support currently must be explicitly provided for
+ in the linker script. */
+ *(.rdata\$)
}
-
-
- .edata BLOCK(__section_alignment__) : {
- *(.edata) ;
+ .edata BLOCK(__section_alignment__) :
+ {
+ *(.edata)
}
-
- /DISCARD/ BLOCK(__section_alignment__) : {
+ /DISCARD/ BLOCK(__section_alignment__) :
+ {
*(.debug\$S)
*(.debug\$T)
*(.debug\$F)
*(.drectve)
- ;
}
.idata BLOCK(__section_alignment__) :
- {
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pe.em:sort_sections. */
*(.idata\$2)
*(.idata\$3)
+ ${RELOCATING+ /* These zeroes mark the end of the import list. */}
+ ${RELOCATING+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);}
*(.idata\$4)
*(.idata\$5)
*(.idata\$6)
*(.idata\$7)
- ;
}
.CRT BLOCK(__section_alignment__) :
{
- *(.CRT\$XCA)
- *(.CRT\$XCC)
- *(.CRT\$XCZ)
- *(.CRT\$XIA)
- *(.CRT\$XIC)
- *(.CRT\$XIZ)
- *(.CRT\$XLA)
- *(.CRT\$XLZ)
- *(.CRT\$XPA)
- *(.CRT\$XPX)
- *(.CRT\$XPZ)
- *(.CRT\$XTA)
- *(.CRT\$XTZ)
- ;
+ /* Grouped sections are used to handle .CRT\$foo. */
+ *(.CRT\$)
}
.rsrc BLOCK(__section_alignment__) :
{
- *(.rsrc\$01)
- *(.rsrc\$02)
- ;
+ /* Grouped sections are used to handle .rsrc\$0[12]. */
+ *(.rsrc\$)
}
.endjunk BLOCK(__section_alignment__) :
{
/* end is deprecated, don't use it */
- ${RELOCATING+ end = .};
- ${RELOCATING+ __end__ = .};
+ ${RELOCATING+ end = .;}
+ ${RELOCATING+ __end__ = .;}
}
.stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
[ .stabstr ]
}
-
.reloc BLOCK(__section_alignment__) :
{
*(.reloc)
- ;
}
-
-
}
EOF