diff options
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/.Sanitize | 1 | ||||
-rw-r--r-- | ld/scripttempl/i386go32.sc | 45 |
2 files changed, 46 insertions, 0 deletions
diff --git a/ld/scripttempl/.Sanitize b/ld/scripttempl/.Sanitize index d06ab82..10fe7ec 100644 --- a/ld/scripttempl/.Sanitize +++ b/ld/scripttempl/.Sanitize @@ -39,6 +39,7 @@ h8500m.sc h8500s.sc hppaelf.sc i386coff.sc +i386go32.sc i960.sc m68kcoff.sc m68klynx.sc diff --git a/ld/scripttempl/i386go32.sc b/ld/scripttempl/i386go32.sc new file mode 100644 index 0000000..9d2ac67 --- /dev/null +++ b/ld/scripttempl/i386go32.sc @@ -0,0 +1,45 @@ +# Linker script for i386 go32 COFF. +# stolen from ian +test -z "$ENTRY" && ENTRY=_start +# 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} + +ENTRY(${ENTRY}) + +SECTIONS +{ + .text ${RELOCATING+ 0x10a8} : { + ${RELOCATING+ *(.init)} + *(.text) + ${RELOCATING+ *(.fini)} + ${RELOCATING+ etext = .}; + } + .data ALIGN (0x1000) : { + *(.data .data2) + *(.ctor) + *(.dtor) + ${RELOCATING+ _edata = .}; + } + .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : + { + *(.bss) + *(COMMON) + ${RELOCATING+ end = .}; + } + ${RELOCATING- ${INIT}} + ${RELOCATING- ${FINI}} + .stab . (NOLOAD) : + { + [ .stab ] + } + .stabstr . (NOLOAD) : + { + [ .stabstr ] + } +} +EOF |