diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-06-07 03:48:00 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-06-07 03:48:00 +0000 |
commit | 94d8217d652d28bf71ba768b142f5cc51086111e (patch) | |
tree | 90726d27e220afde4ca2ae4b3a5f17c2b5d74b3a /ld | |
parent | 1e6479d4d794f6f93e2c6801f9ee1163433f46d6 (diff) | |
download | gdb-94d8217d652d28bf71ba768b142f5cc51086111e.zip gdb-94d8217d652d28bf71ba768b142f5cc51086111e.tar.gz gdb-94d8217d652d28bf71ba768b142f5cc51086111e.tar.bz2 |
* scripttempl/pe.sc: Add zeroes after .idata$3 to mark the end of
the import list.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 18 | ||||
-rw-r--r-- | ld/scripttempl/pe.sc | 114 |
2 files changed, 69 insertions, 63 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 2e30fa5..ecde35f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,19 @@ +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 @@ -5,7 +21,7 @@ Wed May 21 17:44:15 1997 Ian Lance Taylor <ian@cygnus.com> 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> diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index bd9f27e..b497561 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -1,8 +1,5 @@ # 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} @@ -11,95 +8,92 @@ ENTRY(_mainCRTStartup) 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)} : @@ -112,13 +106,9 @@ SECTIONS [ .stabstr ] } - .reloc BLOCK(__section_alignment__) : { *(.reloc) - ; } - - } EOF |