diff options
Diffstat (limited to 'binutils-2.21/ld/emulparams')
286 files changed, 4372 insertions, 0 deletions
diff --git a/binutils-2.21/ld/emulparams/README b/binutils-2.21/ld/emulparams/README new file mode 100644 index 0000000..b3d6d26 --- /dev/null +++ b/binutils-2.21/ld/emulparams/README @@ -0,0 +1,2 @@ +The files in this directory are read by genscripts.sh as shell commands. +They set parameters for the emulations. diff --git a/binutils-2.21/ld/emulparams/aix5ppc.sh b/binutils-2.21/ld/emulparams/aix5ppc.sh new file mode 100644 index 0000000..ff94530 --- /dev/null +++ b/binutils-2.21/ld/emulparams/aix5ppc.sh @@ -0,0 +1,6 @@ +TEMPLATE_NAME=aix +SCRIPT_NAME=aix +OUTPUT_FORMAT="aixcoff-rs6000" +OUTPUT_FORMAT_32BIT="aixcoff-rs6000" +OUTPUT_FORMAT_64BIT="aix5coff64-rs6000" +ARCH=powerpc diff --git a/binutils-2.21/ld/emulparams/aix5rs6.sh b/binutils-2.21/ld/emulparams/aix5rs6.sh new file mode 100644 index 0000000..958e4c1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/aix5rs6.sh @@ -0,0 +1,6 @@ +TEMPLATE_NAME=aix +SCRIPT_NAME=aix +OUTPUT_FORMAT="aixcoff-rs6000" +OUTPUT_FORMAT_32BIT="aixcoff-rs6000" +OUTPUT_FORMAT_64BIT="aix5coff64-rs6000" +ARCH=rs6000 diff --git a/binutils-2.21/ld/emulparams/aixppc.sh b/binutils-2.21/ld/emulparams/aixppc.sh new file mode 100644 index 0000000..9307693 --- /dev/null +++ b/binutils-2.21/ld/emulparams/aixppc.sh @@ -0,0 +1,7 @@ +TEMPLATE_NAME=aix +SCRIPT_NAME=aix +OUTPUT_FORMAT="aixcoff-rs6000" +OUTPUT_FORMAT_32BIT="aixcoff-rs6000" +OUTPUT_FORMAT_64BIT="aixcoff64-rs6000" +ARCH=powerpc + diff --git a/binutils-2.21/ld/emulparams/aixrs6.sh b/binutils-2.21/ld/emulparams/aixrs6.sh new file mode 100644 index 0000000..6033dc1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/aixrs6.sh @@ -0,0 +1,7 @@ +TEMPLATE_NAME=aix +SCRIPT_NAME=aix +OUTPUT_FORMAT="aixcoff-rs6000" +OUTPUT_FORMAT_32BIT="aixcoff-rs6000" +OUTPUT_FORMAT_64BIT="aixcoff64-rs6000" +ARCH=rs6000 + diff --git a/binutils-2.21/ld/emulparams/alpha.sh b/binutils-2.21/ld/emulparams/alpha.sh new file mode 100644 index 0000000..141923f --- /dev/null +++ b/binutils-2.21/ld/emulparams/alpha.sh @@ -0,0 +1,3 @@ +SCRIPT_NAME=alpha +OUTPUT_FORMAT="ecoff-littlealpha" +ARCH=alpha diff --git a/binutils-2.21/ld/emulparams/alphavms.sh b/binutils-2.21/ld/emulparams/alphavms.sh new file mode 100644 index 0000000..ac9b3a2 --- /dev/null +++ b/binutils-2.21/ld/emulparams/alphavms.sh @@ -0,0 +1,7 @@ +SCRIPT_NAME=alphavms + +OUTPUT_FORMAT="vms-alpha" +ARCH=alpha + +COMPILE_IN=yes +EXTRA_EM_FILE=vms
\ No newline at end of file diff --git a/binutils-2.21/ld/emulparams/arcelf.sh b/binutils-2.21/ld/emulparams/arcelf.sh new file mode 100644 index 0000000..cd334d6 --- /dev/null +++ b/binutils-2.21/ld/emulparams/arcelf.sh @@ -0,0 +1,12 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-littlearc" +LITTLE_OUTPUT_FORMAT="elf32-littlearc" +BIG_OUTPUT_FORMAT="elf32-bigarc" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x0 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=arc +MACHINE= +ENTRY=start diff --git a/binutils-2.21/ld/emulparams/arm_epoc_pe.sh b/binutils-2.21/ld/emulparams/arm_epoc_pe.sh new file mode 100644 index 0000000..51a3f76 --- /dev/null +++ b/binutils-2.21/ld/emulparams/arm_epoc_pe.sh @@ -0,0 +1,9 @@ +ARCH=arm +SCRIPT_NAME=epocpe +OUTPUT_FORMAT="epoc-pei-arm-little" +LITTLE_OUTPUT_FORMAT="epoc-pei-arm-little" +BIG_OUTPUT_FORMAT="epoc-pei-arm-big" +TEMPLATE_NAME=pe +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 diff --git a/binutils-2.21/ld/emulparams/arm_wince_pe.sh b/binutils-2.21/ld/emulparams/arm_wince_pe.sh new file mode 100644 index 0000000..133a51c --- /dev/null +++ b/binutils-2.21/ld/emulparams/arm_wince_pe.sh @@ -0,0 +1,13 @@ +ARCH=arm +SCRIPT_NAME=pe + +OUTPUT_FORMAT="pei-arm-wince-little" +LITTLE_OUTPUT_FORMAT="pei-arm-wince-little" +BIG_OUTPUT_FORMAT="pei-arm-wince-big" + +RELOCATEABLE_OUTPUT_FORMAT="pe-arm-wince-little" + +TEMPLATE_NAME=pe +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"\" +TARGET_PAGE_SIZE=0x1000 diff --git a/binutils-2.21/ld/emulparams/armaoutb.sh b/binutils-2.21/ld/emulparams/armaoutb.sh new file mode 100644 index 0000000..efef2c3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armaoutb.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=armaout +OUTPUT_FORMAT="a.out-arm-big" +HEADER_START_ADDR=0x8000 +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=32768 +ARCH=arm diff --git a/binutils-2.21/ld/emulparams/armaoutl.sh b/binutils-2.21/ld/emulparams/armaoutl.sh new file mode 100644 index 0000000..5eccc4c --- /dev/null +++ b/binutils-2.21/ld/emulparams/armaoutl.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=armaout +OUTPUT_FORMAT="a.out-arm-little" +HEADER_START_ADDR=0x8000 +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=32768 +ARCH=arm diff --git a/binutils-2.21/ld/emulparams/armcoff.sh b/binutils-2.21/ld/emulparams/armcoff.sh new file mode 100644 index 0000000..91df7d3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armcoff.sh @@ -0,0 +1,6 @@ +ARCH=arm +SCRIPT_NAME=armcoff +OUTPUT_FORMAT="coff-arm-little" +LITTLE_OUTPUT_FORMAT="coff-arm-little" +BIG_OUTPUT_FORMAT="coff-arm-big" +TEMPLATE_NAME=armcoff diff --git a/binutils-2.21/ld/emulparams/armelf.sh b/binutils-2.21/ld/emulparams/armelf.sh new file mode 100644 index 0000000..672b208 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelf.sh @@ -0,0 +1,35 @@ +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-littlearm" +BIG_OUTPUT_FORMAT="elf32-bigarm" +LITTLE_OUTPUT_FORMAT="elf32-littlearm" +TEXT_START_ADDR=0x8000 +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=armelf +OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)' +OTHER_BSS_SYMBOLS='__bss_start__ = .;' +OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;' +OTHER_END_SYMBOLS='__end__ = . ;' +OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }' +ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }' +OTHER_READONLY_SECTIONS=" + .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } + .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" + +DATA_START_SYMBOLS='__data_start = . ;'; + +GENERATE_SHLIB_SCRIPT=yes + +ARCH=arm +MACHINE= +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ENTRY=_start +EMBEDDED=yes + +# This sets the stack to the top of the simulator memory (2^19 bytes). +STACK_ADDR=0x80000 + +# ARM does not support .s* sections. +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/armelf_fbsd.sh b/binutils-2.21/ld/emulparams/armelf_fbsd.sh new file mode 100644 index 0000000..ee9520d --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelf_fbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/armelf.sh +. ${srcdir}/emulparams/elf_fbsd.sh +TARGET2_TYPE=got-rel diff --git a/binutils-2.21/ld/emulparams/armelf_linux.sh b/binutils-2.21/ld/emulparams/armelf_linux.sh new file mode 100644 index 0000000..35891f1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelf_linux.sh @@ -0,0 +1,24 @@ +ARCH=arm +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-littlearm" +BIG_OUTPUT_FORMAT="elf32-bigarm" +LITTLE_OUTPUT_FORMAT="elf32-littlearm" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=armelf +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes + +DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; +OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)' +OTHER_BSS_SYMBOLS='__bss_start__ = .;' +OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;' +OTHER_END_SYMBOLS='__end__ = . ;' +OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }' + +TEXT_START_ADDR=0x00008000 +TARGET2_TYPE=got-rel + +# ARM does not support .s* sections. +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/armelf_linux_eabi.sh b/binutils-2.21/ld/emulparams/armelf_linux_eabi.sh new file mode 100644 index 0000000..5b0c6b8 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelf_linux_eabi.sh @@ -0,0 +1,9 @@ +. ${srcdir}/emulparams/armelf_linux.sh + +# Use the ARM ABI-compliant exception-handling sections. +OTHER_READONLY_SECTIONS=" + .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } + .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }" + diff --git a/binutils-2.21/ld/emulparams/armelf_nbsd.sh b/binutils-2.21/ld/emulparams/armelf_nbsd.sh new file mode 100644 index 0000000..517cd62 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelf_nbsd.sh @@ -0,0 +1,7 @@ +. ${srcdir}/emulparams/armelf.sh +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TEXT_START_ADDR=0x00008000 +TARGET2_TYPE=got-rel + +unset STACK_ADDR +unset EMBEDDED diff --git a/binutils-2.21/ld/emulparams/armelf_vxworks.sh b/binutils-2.21/ld/emulparams/armelf_vxworks.sh new file mode 100644 index 0000000..ca5c907 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelf_vxworks.sh @@ -0,0 +1,6 @@ +. ${srcdir}/emulparams/armelf.sh +OUTPUT_FORMAT="elf32-littlearm-vxworks" +BIG_OUTPUT_FORMAT="elf32-bigarm-vxworks" +LITTLE_OUTPUT_FORMAT="$OUTPUT_FORMAT" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +. ${srcdir}/emulparams/vxworks.sh diff --git a/binutils-2.21/ld/emulparams/armelfb.sh b/binutils-2.21/ld/emulparams/armelfb.sh new file mode 100644 index 0000000..2d8f382 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelfb.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/armelf.sh +OUTPUT_FORMAT="elf32-bigarm" diff --git a/binutils-2.21/ld/emulparams/armelfb_linux.sh b/binutils-2.21/ld/emulparams/armelfb_linux.sh new file mode 100644 index 0000000..9ce9e9a --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelfb_linux.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/armelf_linux.sh +OUTPUT_FORMAT="elf32-bigarm" diff --git a/binutils-2.21/ld/emulparams/armelfb_linux_eabi.sh b/binutils-2.21/ld/emulparams/armelfb_linux_eabi.sh new file mode 100644 index 0000000..f71c741 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelfb_linux_eabi.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/armelf_linux_eabi.sh +OUTPUT_FORMAT="elf32-bigarm" diff --git a/binutils-2.21/ld/emulparams/armelfb_nbsd.sh b/binutils-2.21/ld/emulparams/armelfb_nbsd.sh new file mode 100644 index 0000000..7ab6ce0 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armelfb_nbsd.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/armelf_nbsd.sh +OUTPUT_FORMAT="elf32-bigarm" diff --git a/binutils-2.21/ld/emulparams/armnbsd.sh b/binutils-2.21/ld/emulparams/armnbsd.sh new file mode 100644 index 0000000..dd4768d --- /dev/null +++ b/binutils-2.21/ld/emulparams/armnbsd.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=aout +TEXT_START_ADDR=0x1020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +OUTPUT_FORMAT="a.out-arm-netbsd" +TARGET_PAGE_SIZE=0x1000 +ARCH=arm +EXECUTABLE_SYMBOLS='__DYNAMIC = 0;' diff --git a/binutils-2.21/ld/emulparams/armnto.sh b/binutils-2.21/ld/emulparams/armnto.sh new file mode 100644 index 0000000..f89f14f --- /dev/null +++ b/binutils-2.21/ld/emulparams/armnto.sh @@ -0,0 +1,28 @@ +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-littlearm" +BIG_OUTPUT_FORMAT="elf32-bigarm" +LITTLE_OUTPUT_FORMAT="elf32-littlearm" +TEXT_START_ADDR=0x00100000 +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=armelf +OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)' +OTHER_BSS_SYMBOLS='__bss_start__ = .;' +OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;' +OTHER_END_SYMBOLS='__end__ = . ;' + +DATA_START_SYMBOLS='__data_start = . ;'; + +GENERATE_SHLIB_SCRIPT=yes + +ARCH=arm +MACHINE= +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" + +ENTRY=_start + +# This sets the stack to the top of the simulator memory (2^19 bytes). +STACK_ADDR=0x80000 + +# ARM does not support .s* sections. +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/armpe.sh b/binutils-2.21/ld/emulparams/armpe.sh new file mode 100644 index 0000000..0c711a5 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armpe.sh @@ -0,0 +1,14 @@ +ARCH=arm +SCRIPT_NAME=pe + +OUTPUT_FORMAT="pei-arm-little" +LITTLE_OUTPUT_FORMAT="pei-arm-little" +BIG_OUTPUT_FORMAT="pei-arm-big" + +RELOCATEABLE_OUTPUT_FORMAT="pe-arm-little" + +TEMPLATE_NAME=pe +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" + +TARGET_PAGE_SIZE=0x1000 diff --git a/binutils-2.21/ld/emulparams/armsymbian.sh b/binutils-2.21/ld/emulparams/armsymbian.sh new file mode 100644 index 0000000..f852702 --- /dev/null +++ b/binutils-2.21/ld/emulparams/armsymbian.sh @@ -0,0 +1,22 @@ +. ${srcdir}/emulparams/armelf.sh +SCRIPT_NAME="armbpabi" +GENERATE_COMBRELOC_SCRIPT=1 +OUTPUT_FORMAT="elf32-littlearm-symbian" +BIG_OUTPUT_FORMAT="elf32-bigarm-symbian" +LITTLE_OUTPUT_FORMAT="$OUTPUT_FORMAT" +TARGET1_IS_REL=1 +TARGET2_TYPE=abs +# On BPABI systems, program headers should not be mapped. +EMBEDDED=yes + +# As for armelf.sh, but add the SymbianOS-specific +# .ARM.exidx$${Base,Limit} symbols. +OTHER_READONLY_SECTIONS=" + .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) } + ${RELOCATING+ PROVIDE_HIDDEN (.ARM.exidx\$\$Base = .); } + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); } + .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) } + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); } + ${RELOCATING+ PROVIDE_HIDDEN (.ARM.exidx\$\$Limit = .); }" + +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" diff --git a/binutils-2.21/ld/emulparams/avr1.sh b/binutils-2.21/ld/emulparams/avr1.sh new file mode 100644 index 0000000..2f6af99 --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr1.sh @@ -0,0 +1,12 @@ +ARCH=avr:1 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=8K +DATA_ORIGIN=0x800060 +DATA_LENGTH=0 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr2.sh b/binutils-2.21/ld/emulparams/avr2.sh new file mode 100644 index 0000000..cb35bb9 --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr2.sh @@ -0,0 +1,12 @@ +ARCH=avr:2 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=8K +DATA_ORIGIN=0x800060 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr25.sh b/binutils-2.21/ld/emulparams/avr25.sh new file mode 100644 index 0000000..2965347 --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr25.sh @@ -0,0 +1,12 @@ +ARCH=avr:25 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=8K +DATA_ORIGIN=0x800060 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr3.sh b/binutils-2.21/ld/emulparams/avr3.sh new file mode 100644 index 0000000..a0b86c4 --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr3.sh @@ -0,0 +1,12 @@ +ARCH=avr:3 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=128K +DATA_ORIGIN=0x800060 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr31.sh b/binutils-2.21/ld/emulparams/avr31.sh new file mode 100644 index 0000000..6e1ee0a --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr31.sh @@ -0,0 +1,12 @@ +ARCH=avr:31 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=128K +DATA_ORIGIN=0x800060 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr35.sh b/binutils-2.21/ld/emulparams/avr35.sh new file mode 100644 index 0000000..abc6790 --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr35.sh @@ -0,0 +1,12 @@ +ARCH=avr:35 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=64K +DATA_ORIGIN=0x800060 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr4.sh b/binutils-2.21/ld/emulparams/avr4.sh new file mode 100644 index 0000000..deaf3e7 --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr4.sh @@ -0,0 +1,12 @@ +ARCH=avr:4 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=8K +DATA_ORIGIN=0x800060 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr5.sh b/binutils-2.21/ld/emulparams/avr5.sh new file mode 100644 index 0000000..2d0fc4f --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr5.sh @@ -0,0 +1,12 @@ +ARCH=avr:5 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=128K +DATA_ORIGIN=0x800060 +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr51.sh b/binutils-2.21/ld/emulparams/avr51.sh new file mode 100644 index 0000000..2069dfe --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr51.sh @@ -0,0 +1,12 @@ +ARCH=avr:51 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=128K +DATA_ORIGIN=0x800100 +DATA_LENGTH=0xff00 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/avr6.sh b/binutils-2.21/ld/emulparams/avr6.sh new file mode 100644 index 0000000..c1a4fab --- /dev/null +++ b/binutils-2.21/ld/emulparams/avr6.sh @@ -0,0 +1,12 @@ +ARCH=avr:6 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=1024K +DATA_ORIGIN=0x800200 +DATA_LENGTH=0xfe00 +EXTRA_EM_FILE=avrelf diff --git a/binutils-2.21/ld/emulparams/bfin.sh b/binutils-2.21/ld/emulparams/bfin.sh new file mode 100755 index 0000000..3de8921 --- /dev/null +++ b/binutils-2.21/ld/emulparams/bfin.sh @@ -0,0 +1,11 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-bfin" +TEXT_START_ADDR=0x0 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TARGET_PAGE_SIZE=0x1000 +ARCH=bfin +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +EMBEDDED=yes +USER_LABEL_PREFIX=_ diff --git a/binutils-2.21/ld/emulparams/coff_i860.sh b/binutils-2.21/ld/emulparams/coff_i860.sh new file mode 100644 index 0000000..03b6493 --- /dev/null +++ b/binutils-2.21/ld/emulparams/coff_i860.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=i860coff +OUTPUT_FORMAT="coff-i860" +PAGE_SIZE=0x1000 +MAXPAGESIZE=0x1000 +ARCH=i860 diff --git a/binutils-2.21/ld/emulparams/coff_sparc.sh b/binutils-2.21/ld/emulparams/coff_sparc.sh new file mode 100644 index 0000000..d66cf61 --- /dev/null +++ b/binutils-2.21/ld/emulparams/coff_sparc.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=sparccoff +OUTPUT_FORMAT="coff-sparc" +# following are dubious (borrowed from sparc lynx) +TARGET_PAGE_SIZE=0x1000 +TEXT_START_ADDR=0 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +ARCH=sparc diff --git a/binutils-2.21/ld/emulparams/crisaout.sh b/binutils-2.21/ld/emulparams/crisaout.sh new file mode 100644 index 0000000..625e90f --- /dev/null +++ b/binutils-2.21/ld/emulparams/crisaout.sh @@ -0,0 +1,6 @@ +# This is for embedded products and elinux (no MMU) with a.out. +SCRIPT_NAME=crisaout +OUTPUT_FORMAT="a.out-cris" +TARGET_PAGE_SIZE=2 +TEXT_START_ADDR=0 +ARCH=cris diff --git a/binutils-2.21/ld/emulparams/criself.sh b/binutils-2.21/ld/emulparams/criself.sh new file mode 100644 index 0000000..f709a1b --- /dev/null +++ b/binutils-2.21/ld/emulparams/criself.sh @@ -0,0 +1,104 @@ +# This is for embedded products (no MMU) with ELF. +MACHINE= +SCRIPT_NAME=elf +TEMPLATE_NAME=elf32 + +# Symbols have underscore prepended. +OUTPUT_FORMAT="elf32-us-cris" +NO_REL_RELOCS=yes +ARCH=cris +MAXPAGESIZE=32 +ENTRY=__start +EMBEDDED=yes +ALIGNMENT=32 +TEXT_START_ADDR=0 + +# Put crt0 for flash/eprom etc. in this section. +INITIAL_READONLY_SECTIONS= +if test -z "${CREATE_SHLIB}"; then + INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" +fi +INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS} + .startup : { KEEP(*(.startup)) }" + +# Setting __Stext to . in TEXT_START_SYMBOLS doesn't get what we want +# most of the time, which is the start of all read-only sections; +# there's at least .startup and .init before it. We have to resort to +# trickery. Note that __Stext is always defined, not PROVIDE:d, since +# external tools look for it. +TEXT_START_SYMBOLS='__Stext = ADDR (.startup);' + +# The __start dance is to get us through assumptions about entry +# symbols, and to clear _start for normal use with sane programs. +EXECUTABLE_SYMBOLS=' +__start = DEFINED(__start) ? __start : + DEFINED(_start) ? _start : + DEFINED(start) ? start : + DEFINED(.startup) ? .startup + 2 : 2; +' + +# Smuggle an "OTHER_TEXT_END_SYMBOLS" here. +OTHER_READONLY_SECTIONS="${RELOCATING+PROVIDE (__Etext = .);}" +DATA_START_SYMBOLS='PROVIDE (__Sdata = .);' + +# Smuggle an "OTHER_DATA_END_SYMBOLS" here. +OTHER_SDATA_SECTIONS="${RELOCATING+PROVIDE (__Edata = .);}" + +# If .bss does not immediately follow .data but has its own start +# address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we +# use ADDR(.bss) there. Instead, we use the symbol support for the +# end symbol. +OTHER_BSS_END_SYMBOLS=' + PROVIDE (__Ebss = .); + __Sbss = ADDR (.bss); + PROVIDE (_bss_start = __Sbss); +' +OTHER_END_SYMBOLS='PROVIDE (__end = .);' + +INIT_START=' + . = ALIGN(2); + ___init__start = .; + PROVIDE (___do_global_ctors = .); +' + +INIT_END=' + PROVIDE (__init__end = .); + PROVIDE (___init__end = .); +' + +FINI_START=' + . = ALIGN (2); + ___fini__start = .; + PROVIDE (___do_global_dtors = .); +' + +FINI_END=' + PROVIDE (__fini__end = .); + ___fini__end = .; +' + +CTOR_START=' + PROVIDE (___ctors = .); + ___elf_ctors_dtors_begin = .; +' + +CTOR_END=' + PROVIDE (___ctors_end = .); +' + +DTOR_START=' + PROVIDE (___dtors = .); +' + +CTOR_END=' + PROVIDE (___dtors_end = .); + ___elf_ctors_dtors_end = .; +' + +# Also add the other symbols provided for rsim/xsim and elinux. +OTHER_SYMBOLS=' + PROVIDE (__Eall = .); + PROVIDE (__Endmem = 0x10000000); + PROVIDE (__Stacksize = 0); +' +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/crislinux.sh b/binutils-2.21/ld/emulparams/crislinux.sh new file mode 100644 index 0000000..8a1a5b8 --- /dev/null +++ b/binutils-2.21/ld/emulparams/crislinux.sh @@ -0,0 +1,40 @@ +# This is an approximation of what we want for a real linux system (with MMU and ELF). +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-cris" +NO_REL_RELOCS=yes +ARCH=cris +TEMPLATE_NAME=elf32 + +ENTRY=_start + +# Needed? Perhaps should be page-size alignment. +ALIGNMENT=32 +GENERATE_SHLIB_SCRIPT=yes + +# Is this high enough and low enough? +TEXT_START_ADDR=0x80000 + +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" + +# We don't do the hoops through DEFINED to provide [_]*start, as it +# doesn't work with --gc-sections, and the start-name is pretty fixed +# anyway. +TEXT_START_SYMBOLS='PROVIDE (__Stext = .);' + +# Smuggle an "OTHER_TEXT_END_SYMBOLS" here. +OTHER_READONLY_SECTIONS="${RELOCATING+PROVIDE (__Etext = .);}" +DATA_START_SYMBOLS='PROVIDE (__Sdata = .);' + +# Smuggle an "OTHER_DATA_END_SYMBOLS" here. +OTHER_SDATA_SECTIONS="${RELOCATING+PROVIDE (__Edata = .);}" +OTHER_BSS_SYMBOLS='PROVIDE (__Sbss = .);' +OTHER_BSS_END_SYMBOLS='PROVIDE (__Ebss = .);' + +# Also add the other symbols provided for rsim/xsim and elinux. +OTHER_SYMBOLS=' + PROVIDE (__Eall = .); + PROVIDE (__Endmem = 0x10000000); + PROVIDE (__Stacksize = 0); +' +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/d10velf.sh b/binutils-2.21/ld/emulparams/d10velf.sh new file mode 100644 index 0000000..c8de5c4 --- /dev/null +++ b/binutils-2.21/ld/emulparams/d10velf.sh @@ -0,0 +1,9 @@ +MACHINE= +SCRIPT_NAME=elfd10v +OUTPUT_FORMAT="elf32-d10v" +TEXT_START_ADDR=0x01014000 +READONLY_START_ADDR=0x02000004 +ARCH=d10v +MAXPAGESIZE=32 +EMBEDDED=t +TEMPLATE_NAME=elf32 diff --git a/binutils-2.21/ld/emulparams/d30v_e.sh b/binutils-2.21/ld/emulparams/d30v_e.sh new file mode 100644 index 0000000..617a048 --- /dev/null +++ b/binutils-2.21/ld/emulparams/d30v_e.sh @@ -0,0 +1,22 @@ +MACHINE= +SCRIPT_NAME=elfd30v +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-d30v" +TEXT_START_ADDR=0x00000000 +DATA_START_ADDR=0x20000000 +EMEM_START_ADDR=0x80000000 +STACK_START_ADDR=0x20008000 +EIT_START_ADDR=0xfffff020 +TEXT_SIZE=64K +DATA_SIZE=32K +EMEM_SIZE=8M +EIT_SIZE=320 +TEXT_MEMORY=emem +DATA_MEMORY=emem +BSS_MEMORY=emem +TEXT_DEF_SECTION="" +DATA_DEF_SECTION="" +EMEM_DEF_SECTION="(rwx)" +ARCH=d30v +EMBEDDED=t diff --git a/binutils-2.21/ld/emulparams/d30v_o.sh b/binutils-2.21/ld/emulparams/d30v_o.sh new file mode 100644 index 0000000..79ba83b --- /dev/null +++ b/binutils-2.21/ld/emulparams/d30v_o.sh @@ -0,0 +1,22 @@ +MACHINE= +SCRIPT_NAME=elfd30v +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-d30v" +TEXT_START_ADDR=0x00000000 +DATA_START_ADDR=0x20000000 +EMEM_START_ADDR=0x80000000 +STACK_START_ADDR=0x20008000 +EIT_START_ADDR=0xfffff020 +TEXT_SIZE=64K +DATA_SIZE=32K +EMEM_SIZE=8M +EIT_SIZE=320 +TEXT_MEMORY=text +DATA_MEMORY=data +BSS_MEMORY=data +TEXT_DEF_SECTION="(x)" +DATA_DEF_SECTION="(rw)" +EMEM_DEF_SECTION="" +ARCH=d30v +EMBEDDED=t diff --git a/binutils-2.21/ld/emulparams/d30velf.sh b/binutils-2.21/ld/emulparams/d30velf.sh new file mode 100644 index 0000000..ab0d70f --- /dev/null +++ b/binutils-2.21/ld/emulparams/d30velf.sh @@ -0,0 +1,22 @@ +MACHINE= +SCRIPT_NAME=elfd30v +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-d30v" +TEXT_START_ADDR=0x00000000 +DATA_START_ADDR=0x20000000 +EMEM_START_ADDR=0x80000000 +STACK_START_ADDR=0x20008000 +EIT_START_ADDR=0xfffff020 +TEXT_SIZE=2000K +DATA_SIZE=2000K +EMEM_SIZE=8M +EIT_SIZE=320 +TEXT_MEMORY=text +DATA_MEMORY=data +BSS_MEMORY=data +TEXT_DEF_SECTION="(x)" +DATA_DEF_SECTION="(rw)" +EMEM_DEF_SECTION="" +ARCH=d30v +EMBEDDED=t diff --git a/binutils-2.21/ld/emulparams/delta68.sh b/binutils-2.21/ld/emulparams/delta68.sh new file mode 100644 index 0000000..e3c5909 --- /dev/null +++ b/binutils-2.21/ld/emulparams/delta68.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=delta68 +OUTPUT_FORMAT="coff-m68k-sysv" +TEXT_START_ADDR=0x2000 +PAGE_SIZE=0x1000000 +ARCH=m68k diff --git a/binutils-2.21/ld/emulparams/elf32_dlx.sh b/binutils-2.21/ld/emulparams/elf32_dlx.sh new file mode 100644 index 0000000..525b209 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_dlx.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=dlx +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-dlx" +ARCH=dlx +MACHINE= +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=1 +EMBEDDED=yes +MAXPAGESIZE=1 diff --git a/binutils-2.21/ld/emulparams/elf32_i860.sh b/binutils-2.21/ld/emulparams/elf32_i860.sh new file mode 100644 index 0000000..482e3d1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_i860.sh @@ -0,0 +1,12 @@ +# A work in progress... +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-i860-little" +BIG_OUTPUT_FORMAT="elf32-i860" +LITTLE_OUTPUT_FORMAT="elf32-i860-little" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0 +PAGE_SIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i860 diff --git a/binutils-2.21/ld/emulparams/elf32_i960.sh b/binutils-2.21/ld/emulparams/elf32_i960.sh new file mode 100644 index 0000000..dd05a8f --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_i960.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-i960" +NO_RELA_RELOCS=yes +ARCH=i960 +MACHINE= +TEXT_START_ADDR=0 +EMBEDDED=yes +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" diff --git a/binutils-2.21/ld/emulparams/elf32_sparc.sh b/binutils-2.21/ld/emulparams/elf32_sparc.sh new file mode 100644 index 0000000..13af316 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_sparc.sh @@ -0,0 +1,18 @@ +# If you change this file, please also look at files which source this one: +# elf32_sparc_vxworks.sh + +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-sparc" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x10000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ALIGNMENT=8 +ARCH=sparc +MACHINE= +TEMPLATE_NAME=elf32 +DATA_PLT= +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NOP=0x01000000 +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/elf32_sparc_sol2.sh b/binutils-2.21/ld/emulparams/elf32_sparc_sol2.sh new file mode 100644 index 0000000..46ca284 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_sparc_sol2.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf32_sparc.sh +. ${srcdir}/emulparams/solaris2.sh +EXTRA_EM_FILE=solaris2 +OUTPUT_FORMAT="elf32-sparc-sol2" diff --git a/binutils-2.21/ld/emulparams/elf32_sparc_vxworks.sh b/binutils-2.21/ld/emulparams/elf32_sparc_vxworks.sh new file mode 100644 index 0000000..12a9b38 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_sparc_vxworks.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf32_sparc.sh +OUTPUT_FORMAT="elf32-sparc-vxworks" +unset DATA_PLT +. ${srcdir}/emulparams/vxworks.sh diff --git a/binutils-2.21/ld/emulparams/elf32_spu.sh b/binutils-2.21/ld/emulparams/elf32_spu.sh new file mode 100644 index 0000000..6993ca7 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_spu.sh @@ -0,0 +1,27 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=spuelf +OUTPUT_FORMAT="elf32-spu" +NO_REL_RELOCS=yes +ARCH=spu +MACHINE= +ALIGNMENT=16 +TEXT_START_ADDR=0 +INITIAL_READONLY_SECTIONS='.interrupt : { KEEP(*(.interrupt)) }' +if test -z "${CREATE_SHLIB}"; then + INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS} + .interp ${RELOCATING-0} : { *(.interp) }" +fi +OTHER_END_SYMBOLS='PROVIDE (__stack = 0x3fff0);' +NO_SMALL_DATA=true +EMBEDDED=true +MAXPAGESIZE=0x80 +DATA_ADDR="ALIGN(${MAXPAGESIZE})" +OTHER_BSS_SECTIONS=".toe ALIGN(128) : { *(.toe) } = 0" +OTHER_SECTIONS=".note.spu_name 0 : { KEEP(*(.note.spu_name)) } + ._ea 0 : { KEEP(*(._ea)) KEEP(*(._ea.*)) }" +OTHER_READONLY_SECTIONS=" + .fixup ${RELOCATING-0} : { + PROVIDE (__fixup_start = .); + KEEP(*(.fixup)) + }" diff --git a/binutils-2.21/ld/emulparams/elf32_tic6x_be.sh b/binutils-2.21/ld/emulparams/elf32_tic6x_be.sh new file mode 100644 index 0000000..648320f --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_tic6x_be.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf32_tic6x_le.sh +OUTPUT_FORMAT="elf32-tic6x-be" diff --git a/binutils-2.21/ld/emulparams/elf32_tic6x_le.sh b/binutils-2.21/ld/emulparams/elf32_tic6x_le.sh new file mode 100644 index 0000000..7a78a2c --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32_tic6x_le.sh @@ -0,0 +1,40 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-tic6x-le" +# This address is an arbitrary value expected to be suitable for +# semihosting simulator use, but not on hardware where it is expected +# to be overridden. +TEXT_START_ADDR=0x8000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=tic6x +EXECUTABLE_SYMBOLS="EXTERN (__c6xabi_DSBT_BASE);" +SDATA_START_SYMBOLS="PROVIDE_HIDDEN (__c6xabi_DSBT_BASE = .);" +# ".bss" is near (small) BSS, ".far" is far (normal) BSS, ".const" is +# far read-only data, ".rodata" is near read-only data. ".neardata" +# is near (small) data, ".fardata" is (along with .data) far data. +RODATA_NAME="const" +SDATA_NAME="neardata" +SBSS_NAME="bss" +BSS_NAME="far" +OTHER_SDATA_SECTIONS=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.*}) }" +OTHER_READONLY_RELOC_SECTIONS=" + .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.*}) } + .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.*}) }" +OTHER_READWRITE_SECTIONS=".fardata ${RELOCATING-0} : { *(.fardata${RELOCATING+ .fardata.*}) }" +OTHER_READWRITE_RELOC_SECTIONS=" + .rel.fardata ${RELOCATING-0} : { *(.rel.fardata${RELOCATING+ .rel.fardata.*}) } + .rela.fardata ${RELOCATING-0} : { *(.rela.fardata${RELOCATING+ .rela.fardata.*}) }" +OTHER_BSS_SECTIONS=" + .heap : + { + . = ALIGN(4); + _HEAP_START = .; + . += 0x2000000; + _HEAP_MAX = .; + } + .stack : + { + . += 0x100000; + _STACK_START = .; + }" +ATTRS_SECTIONS='.c6xabi.attributes 0 : { KEEP (*(.c6xabi.attributes)) KEEP (*(.gnu.attributes)) }' diff --git a/binutils-2.21/ld/emulparams/elf32am33lin.sh b/binutils-2.21/ld/emulparams/elf32am33lin.sh new file mode 100644 index 0000000..b34d2b8 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32am33lin.sh @@ -0,0 +1,11 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-am33lin" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x8000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=mn10300 +MACHINE= +NOP=0xcbcb +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + diff --git a/binutils-2.21/ld/emulparams/elf32b4300.sh b/binutils-2.21/ld/emulparams/elf32b4300.sh new file mode 100644 index 0000000..52fa295 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32b4300.sh @@ -0,0 +1,9 @@ +# If you change this file, please also look at files which source this one: +# elf32l4300.sh + +EMBEDDED=yes +. ${srcdir}/emulparams/elf32bmip.sh +TEXT_START_ADDR=0xa0020000 +unset SHLIB_TEXT_START_ADDR +EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;' +DYNAMIC_LINK=FALSE diff --git a/binutils-2.21/ld/emulparams/elf32bfinfd.sh b/binutils-2.21/ld/emulparams/elf32bfinfd.sh new file mode 100644 index 0000000..3e0420e --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32bfinfd.sh @@ -0,0 +1,45 @@ +. ${srcdir}/emulparams/bfin.sh +unset STACK_ADDR +OUTPUT_FORMAT="elf32-bfinfdpic" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +EMBEDDED= # This gets us program headers mapped as part of the text segment. +OTHER_GOT_SYMBOLS= +OTHER_READONLY_SECTIONS=" + .rofixup : { + ${RELOCATING+__ROFIXUP_LIST__ = .;} + *(.rofixup) + ${RELOCATING+__ROFIXUP_END__ = .;} + } +" +# 0xfeb00000, 0xfec00000, 0xff700000, 0xff800000, 0xff900000 +# 0xffa00000 are also used in Dynamic linker and linux kernel. +# They need to be kept synchronized. +OTHER_SECTIONS=" + .l2.text 0xfeb00000 : + { + *(.l2.text) + } + .l2.data 0xfec00000 : + { + *(.l2.data) + } + .l1.data 0xff700000 : + { + *(.l1.data) + } + .l1.data.A 0xff800000 : + { + *(.l1.data.A) + } + .l1.data.B 0xff900000 : + { + *(.l1.data.B) + } + .l1.text 0xffa00000 : + { + *(.l1.text) + } +" diff --git a/binutils-2.21/ld/emulparams/elf32bmip.sh b/binutils-2.21/ld/emulparams/elf32bmip.sh new file mode 100644 index 0000000..44a0b8a --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32bmip.sh @@ -0,0 +1,81 @@ +# If you change this file, please also look at files which source this one: +# elf32b4300.sh elf32bsmip.sh elf32btsmip.sh elf32ebmip.sh elf32lmip.sh +# elf32ebmipvxworks.sh elf32elmipvxworks.sh + +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-bigmips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" +TEXT_START_ADDR=0x0400000 +test -n "${EMBEDDED}" || DATA_ADDR=0x10000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +SHLIB_TEXT_START_ADDR=0x5ffe0000 +TEXT_DYNAMIC= +INITIAL_READONLY_SECTIONS= +if test -z "${CREATE_SHLIB}"; then + INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" +fi +INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS} + .reginfo ${RELOCATING-0} : { *(.reginfo) } +" +OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)' +# Unlike most targets, the MIPS backend puts all dynamic relocations +# in a single dynobj section, which it also calls ".rel.dyn". It does +# this so that it can easily sort all dynamic relocations before the +# output section has been populated. +OTHER_GOT_RELOC_SECTIONS=" + .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) } +" +# If the output has a GOT section, there must be exactly 0x7ff0 bytes +# between .got and _gp. The ". = ." below stops the orphan code from +# inserting other sections between the assignment to _gp and the start +# of .got. +OTHER_GOT_SYMBOLS=' + . = .; + _gp = ALIGN(16) + 0x7ff0; +' +# .got.plt is only used for the PLT psABI extension. It should not be +# included in the .sdata block with .got, as there is no need to access +# the section from _gp. Note that the traditional: +# +# . = . +# _gp = ALIGN (16) + 0x7ff0; +# .got : { *(.got.plt) *(.got) } +# +# would set _gp to the wrong value; _gp - 0x7ff0 must point to the start +# of *(.got). +GOT=".got ${RELOCATING-0} : { *(.got) }" +unset OTHER_READWRITE_SECTIONS +unset OTHER_RELRO_SECTIONS +if test -n "$RELRO_NOW"; then + OTHER_RELRO_SECTIONS=".got.plt ${RELOCATING-0} : { *(.got.plt) }" +else + OTHER_READWRITE_SECTIONS=".got.plt ${RELOCATING-0} : { *(.got.plt) }" +fi + +OTHER_SDATA_SECTIONS=" + .lit8 ${RELOCATING-0} : { *(.lit8) } + .lit4 ${RELOCATING-0} : { *(.lit4) } +" +TEXT_START_SYMBOLS='_ftext = . ;' +DATA_START_SYMBOLS='_fdata = . ;' +OTHER_BSS_SYMBOLS='_fbss = .;' +OTHER_SECTIONS=' + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } + .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) } + .mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) } + .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) } + .mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) } + .mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) } + .mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) } + .gcc_compiled_long32 : { KEEP(*(.gcc_compiled_long32)) } + .gcc_compiled_long64 : { KEEP(*(.gcc_compiled_long64)) } +' +ARCH=mips +MACHINE= +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=mipself +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes diff --git a/binutils-2.21/ld/emulparams/elf32bmipn32-defs.sh b/binutils-2.21/ld/emulparams/elf32bmipn32-defs.sh new file mode 100644 index 0000000..45bfd5d --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32bmipn32-defs.sh @@ -0,0 +1,96 @@ +# If you change this file, please also look at files which source this one: +# elf64bmip.sh elf64btsmip.sh elf32btsmipn32.sh elf32bmipn32.sh + +# This is an ELF platform. +SCRIPT_NAME=elf + +# Handle both big- and little-ended 32-bit MIPS objects. +ARCH=mips +OUTPUT_FORMAT="elf32-bigmips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" + +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=mipself + +case "$EMULATION_NAME" in +elf32*n32*) ELFSIZE=32 ;; +elf64*) ELFSIZE=64 ;; +*) echo $0: unhandled emulation $EMULATION_NAME >&2; exit 1 ;; +esac + +if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + ;; + esac +fi + +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. +LIBPATH_SUFFIX=$ELFSIZE + +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes + +TEXT_START_ADDR=0x10000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ENTRY=__start + +# Unlike most targets, the MIPS backend puts all dynamic relocations +# in a single dynobj section, which it also calls ".rel.dyn". It does +# this so that it can easily sort all dynamic relocations before the +# output section has been populated. +OTHER_GOT_RELOC_SECTIONS=" + .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) } +" +# GOT-related settings. +# If the output has a GOT section, there must be exactly 0x7ff0 bytes +# between .got and _gp. The ". = ." below stops the orphan code from +# inserting other sections between the assignment to _gp and the start +# of .got. +OTHER_GOT_SYMBOLS=' + . = .; + _gp = ALIGN(16) + 0x7ff0; +' +# .got.plt is only used for the PLT psABI extension. It should not be +# included in the .sdata block with .got, as there is no need to access +# the section from _gp. Note that the traditional: +# +# . = . +# _gp = ALIGN (16) + 0x7ff0; +# .got : { *(.got.plt) *(.got) } +# +# would set _gp to the wrong value; _gp - 0x7ff0 must point to the start +# of *(.got). +GOT=".got ${RELOCATING-0} : { *(.got) }" +unset OTHER_READWRITE_SECTIONS +unset OTHER_RELRO_SECTIONS +if test -n "$RELRO_NOW"; then + OTHER_RELRO_SECTIONS=".got.plt ${RELOCATING-0} : { *(.got.plt) }" +else + OTHER_READWRITE_SECTIONS=".got.plt ${RELOCATING-0} : { *(.got.plt) }" +fi + +OTHER_SDATA_SECTIONS=" + .lit8 ${RELOCATING-0} : { *(.lit8) } + .lit4 ${RELOCATING-0} : { *(.lit4) } + .srdata ${RELOCATING-0} : { *(.srdata) } +" + +# Magic symbols. +TEXT_START_SYMBOLS='_ftext = . ;' +DATA_START_SYMBOLS='_fdata = . ;' +OTHER_BSS_SYMBOLS='_fbss = .;' + +INITIAL_READONLY_SECTIONS= +if test -z "${CREATE_SHLIB}"; then + INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" +fi +INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS} + .reginfo ${RELOCATING-0} : { *(.reginfo) }" +# Discard any .MIPS.content* or .MIPS.events* sections. The linker +# doesn't know how to adjust them. +OTHER_SECTIONS="/DISCARD/ : { *(.MIPS.content*) *(.MIPS.events*) }" + +TEXT_DYNAMIC= diff --git a/binutils-2.21/ld/emulparams/elf32bmipn32.sh b/binutils-2.21/ld/emulparams/elf32bmipn32.sh new file mode 100755 index 0000000..c26b6b3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32bmipn32.sh @@ -0,0 +1,22 @@ +. ${srcdir}/emulparams/elf32bmipn32-defs.sh +OUTPUT_FORMAT="elf32-nbigmips" +BIG_OUTPUT_FORMAT="elf32-nbigmips" +LITTLE_OUTPUT_FORMAT="elf32-nlittlemips" +SHLIB_TEXT_START_ADDR=0x5ffe0000 +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" + +# IRIX6 defines these symbols. 0x34 is the size of the ELF header. +EXECUTABLE_SYMBOLS=" + __dso_displacement = 0; + __elf_header = ${TEXT_START_ADDR}; + __program_header_table = ${TEXT_START_ADDR} + 0x34; +" + +# There are often dynamic relocations against the .rodata section. +# Setting DT_TEXTREL in the .dynamic section does not convince the +# IRIX6 linker to permit relocations against the text segment. +# Following the IRIX linker, we simply put .rodata in the data +# segment. +WRITABLE_RODATA= + +EXTRA_EM_FILE=irix diff --git a/binutils-2.21/ld/emulparams/elf32bsmip.sh b/binutils-2.21/ld/emulparams/elf32bsmip.sh new file mode 100644 index 0000000..dfe0fe0 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32bsmip.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf32bmip.sh +ENTRY=__start +EXTRA_EM_FILE=irix diff --git a/binutils-2.21/ld/emulparams/elf32btsmip.sh b/binutils-2.21/ld/emulparams/elf32btsmip.sh new file mode 100644 index 0000000..e29e045 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32btsmip.sh @@ -0,0 +1,10 @@ +# If you change this file, please also look at files which source this one: +# elf32ltsmip.sh + +. ${srcdir}/emulparams/elf32bmip.sh +OUTPUT_FORMAT="elf32-tradbigmips" +BIG_OUTPUT_FORMAT="elf32-tradbigmips" +LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips" +unset DATA_ADDR +SHLIB_TEXT_START_ADDR=0 +ENTRY=__start diff --git a/binutils-2.21/ld/emulparams/elf32btsmipn32.sh b/binutils-2.21/ld/emulparams/elf32btsmipn32.sh new file mode 100644 index 0000000..10c5565 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32btsmipn32.sh @@ -0,0 +1,15 @@ +# If you change this file, please also look at files which source this one: +# elf32ltsmipn32.sh + +. ${srcdir}/emulparams/elf32bmipn32-defs.sh +OUTPUT_FORMAT="elf32-ntradbigmips" +BIG_OUTPUT_FORMAT="elf32-ntradbigmips" +LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" + +# Magic sections. +OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)' +OTHER_SECTIONS=' + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +' diff --git a/binutils-2.21/ld/emulparams/elf32cr16.sh b/binutils-2.21/ld/emulparams/elf32cr16.sh new file mode 100644 index 0000000..bc9ae51 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32cr16.sh @@ -0,0 +1,7 @@ +SCRIPT_NAME=elf32cr16 +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-cr16" +ARCH=cr16 +ENTRY=_start +EXTRA_EM_FILE=cr16elf +EMBEDDED=yes diff --git a/binutils-2.21/ld/emulparams/elf32cr16c.sh b/binutils-2.21/ld/emulparams/elf32cr16c.sh new file mode 100644 index 0000000..e78e5ed --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32cr16c.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=elf32cr16c +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-cr16c" +ARCH=cr16c +ENTRY=_start diff --git a/binutils-2.21/ld/emulparams/elf32crx.sh b/binutils-2.21/ld/emulparams/elf32crx.sh new file mode 100644 index 0000000..24960ec --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32crx.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=elf32crx +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-crx" +ARCH=crx +ENTRY=_start +EXTRA_EM_FILE=crxelf diff --git a/binutils-2.21/ld/emulparams/elf32ebmip.sh b/binutils-2.21/ld/emulparams/elf32ebmip.sh new file mode 100644 index 0000000..704b43e --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ebmip.sh @@ -0,0 +1,2 @@ +EMBEDDED=yes +. ${srcdir}/emulparams/elf32bmip.sh diff --git a/binutils-2.21/ld/emulparams/elf32ebmipvxworks.sh b/binutils-2.21/ld/emulparams/elf32ebmipvxworks.sh new file mode 100644 index 0000000..6d1cc3c --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ebmipvxworks.sh @@ -0,0 +1,20 @@ +. ${srcdir}/emulparams/elf32bmip.sh + +OUTPUT_FORMAT="elf32-bigmips-vxworks" +BIG_OUTPUT_FORMAT="elf32-bigmips-vxworks" +LITTLE_OUTPUT_FORMAT="elf32-littlemips-vxworks" +# VxWorks .rdata sections are normally read-only, but one of the objects +# in libdl.a (the dynamic loader) is actually read-write. Explicitly +# place the section in the appropriate segment for its flags. +OTHER_READONLY_SECTIONS=" + .rdata ${RELOCATING-0} : ONLY_IF_RO { *(.rdata) } +" +OTHER_READWRITE_SECTIONS=" + .rdata ${RELOCATING-0} : ONLY_IF_RW { *(.rdata) } +" +unset OTHER_GOT_SYMBOLS +SHLIB_TEXT_START_ADDR=0 +unset TEXT_DYNAMIC +unset DATA_ADDR + +. ${srcdir}/emulparams/vxworks.sh diff --git a/binutils-2.21/ld/emulparams/elf32elmip.sh b/binutils-2.21/ld/emulparams/elf32elmip.sh new file mode 100644 index 0000000..c94e503 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32elmip.sh @@ -0,0 +1,2 @@ +EMBEDDED=yes +. ${srcdir}/emulparams/elf32lmip.sh diff --git a/binutils-2.21/ld/emulparams/elf32elmipvxworks.sh b/binutils-2.21/ld/emulparams/elf32elmipvxworks.sh new file mode 100644 index 0000000..c123944 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32elmipvxworks.sh @@ -0,0 +1,11 @@ +. ${srcdir}/emulparams/elf32bmip.sh + +OUTPUT_FORMAT="elf32-littlemips-vxworks" +BIG_OUTPUT_FORMAT="elf32-bigmips-vxworks" +LITTLE_OUTPUT_FORMAT="elf32-littlemips-vxworks" +unset OTHER_GOT_SYMBOLS +SHLIB_TEXT_START_ADDR=0 +unset TEXT_DYNAMIC +unset DATA_ADDR + +. ${srcdir}/emulparams/vxworks.sh diff --git a/binutils-2.21/ld/emulparams/elf32fr30.sh b/binutils-2.21/ld/emulparams/elf32fr30.sh new file mode 100755 index 0000000..1764a32 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32fr30.sh @@ -0,0 +1,13 @@ +MACHINE= +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-fr30" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x10000 +ARCH=fr30 +MAXPAGESIZE=256 +ENTRY=_start +EMBEDDED=yes +NOP=0x9fa09fa0 +OTHER_SYMBOLS='PROVIDE (__stack = 0x200000);' diff --git a/binutils-2.21/ld/emulparams/elf32frv.sh b/binutils-2.21/ld/emulparams/elf32frv.sh new file mode 100755 index 0000000..9037072 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32frv.sh @@ -0,0 +1,21 @@ +MACHINE= +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-frv" +TEXT_START_ADDR=0x10000 +ARCH=frv +MAXPAGESIZE=256 +ENTRY=_start +EMBEDDED=yes +OTHER_EXCLUDE_FILES='*frvend.o' +OTHER_END_SYMBOLS='__end = .;' +DATA_START_SYMBOLS='__data_start = . ;' +STACK_ADDR=0x200000 +NOP=0x80000000 +OTHER_GOT_SYMBOLS=' + . = ALIGN(8); _gp = . + 2048; + PROVIDE (gp = _gp);' +OTHER_READONLY_SECTIONS=' + .rofixup : { *(.rofixup) } +' diff --git a/binutils-2.21/ld/emulparams/elf32frvfd.sh b/binutils-2.21/ld/emulparams/elf32frvfd.sh new file mode 100644 index 0000000..c174669 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32frvfd.sh @@ -0,0 +1,17 @@ +. ${srcdir}/emulparams/elf32frv.sh +unset STACK_ADDR +OUTPUT_FORMAT="elf32-frvfdpic" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TEMPLATE_NAME=elf32 +unset EXTRA_EM_FILE +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +EMBEDDED= # This gets us program headers mapped as part of the text segment. +OTHER_GOT_SYMBOLS= +OTHER_READONLY_SECTIONS=" + .rofixup : { + ${RELOCATING+__ROFIXUP_LIST__ = .;} + *(.rofixup) + ${RELOCATING+__ROFIXUP_END__ = .;} + } +" diff --git a/binutils-2.21/ld/emulparams/elf32i370.sh b/binutils-2.21/ld/emulparams/elf32i370.sh new file mode 100644 index 0000000..425238c --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32i370.sh @@ -0,0 +1,8 @@ +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +SCRIPT_NAME=elfi370 +OUTPUT_FORMAT="elf32-i370" +TEXT_START_ADDR=0x01800000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i370 +MACHINE= diff --git a/binutils-2.21/ld/emulparams/elf32ip2k.sh b/binutils-2.21/ld/emulparams/elf32ip2k.sh new file mode 100644 index 0000000..0db227f --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ip2k.sh @@ -0,0 +1,21 @@ +TEMPLATE_NAME=elf32 +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-ip2k" +NO_REL_RELOCS=yes +# See also `include/elf/ip2k.h' +DATA_ADDR=0x01000100 +TEXT_START_ADDR=0x02010000 +GPR_START_ADDR=0x1000080 +GPR_SIZE=0x7F +GRP_MEMORY=gpr +ARCH=ip2k +ENTRY=__start +EMBEDDED=yes +ELFSIZE=32 +MAXPAGESIZE=256 +WRITABLE_RODATA= +OTHER_RELOCATING_SECTIONS='PROVIDE (__stack = 0x01000FFF);' +OTHER_READONLY_SECTIONS='.pram 0x2000000 : { *(.pram) } .reset 0x201FFE0 : { *(.reset) }' +OTHER_READWRITE_SECTIONS='.gpr 0x1000080 : { *(.gpr) }' + diff --git a/binutils-2.21/ld/emulparams/elf32iq10.sh b/binutils-2.21/ld/emulparams/elf32iq10.sh new file mode 100755 index 0000000..2c0d75f --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32iq10.sh @@ -0,0 +1,13 @@ +MACHINE= +SCRIPT_NAME=iq2000 +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-iq2000" +DATA_ADDR=0x1000 +TEXT_START_ADDR=0x80000000 +ARCH=iq2000 +ENTRY=_start +EMBEDDED=yes +ELFSIZE=32 +MAXPAGESIZE=256 +OTHER_RELOCATING_SECTIONS='PROVIDE (__stack = 0x1800);' diff --git a/binutils-2.21/ld/emulparams/elf32iq2000.sh b/binutils-2.21/ld/emulparams/elf32iq2000.sh new file mode 100755 index 0000000..a21276a --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32iq2000.sh @@ -0,0 +1,16 @@ +MACHINE= +SCRIPT_NAME=iq2000 +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-iq2000" +DATA_ADDR=0x1000 +TEXT_START_ADDR=0x80000000 +ARCH=iq2000 +MAXPAGESIZE=256 +ENTRY=_start +EMBEDDED=yes +CTOR_START='__ctors = .;' +CTOR_END='__ctors_end = .;' +DTOR_START='__dtors = .;' +DTOR_END='__dtors_end = .;' +OTHER_RELOCATING_SECTIONS='PROVIDE (__stack = 0x1800);' diff --git a/binutils-2.21/ld/emulparams/elf32l4300.sh b/binutils-2.21/ld/emulparams/elf32l4300.sh new file mode 100644 index 0000000..865792a --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32l4300.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf32b4300.sh +OUTPUT_FORMAT="elf32-littlemips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" diff --git a/binutils-2.21/ld/emulparams/elf32lm32.sh b/binutils-2.21/ld/emulparams/elf32lm32.sh new file mode 100644 index 0000000..b3fcd32 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32lm32.sh @@ -0,0 +1,10 @@ +ARCH=lm32 +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-lm32" +MAXPAGESIZE=0x1000 +EMBEDDED=yes +TEMPLATE_NAME=elf32 +TEXT_START_ADDR=0x0000 +DYNAMIC_LINK=FALSE +ALIGNMENT=4 diff --git a/binutils-2.21/ld/emulparams/elf32lm32fd.sh b/binutils-2.21/ld/emulparams/elf32lm32fd.sh new file mode 100644 index 0000000..32a4d58 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32lm32fd.sh @@ -0,0 +1,16 @@ +. ${srcdir}/emulparams/elf32lm32.sh +unset STACK_ADDR +OUTPUT_FORMAT="elf32-lm32fdpic" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +EMBEDDED= # This gets us program headers mapped as part of the text segment. +OTHER_GOT_SYMBOLS= +OTHER_READONLY_SECTIONS=" + .rofixup : { + ${RELOCATING+__ROFIXUP_LIST__ = .;} + *(.rofixup) + ${RELOCATING+__ROFIXUP_END__ = .;} + } +" diff --git a/binutils-2.21/ld/emulparams/elf32lmip.sh b/binutils-2.21/ld/emulparams/elf32lmip.sh new file mode 100644 index 0000000..14d4ded --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32lmip.sh @@ -0,0 +1,7 @@ +# If you change this file, please also look at files which source this one: +# elf32elmip.sh elf32lsmip.sh + +. ${srcdir}/emulparams/elf32bmip.sh +OUTPUT_FORMAT="elf32-littlemips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" diff --git a/binutils-2.21/ld/emulparams/elf32lppc.sh b/binutils-2.21/ld/emulparams/elf32lppc.sh new file mode 100644 index 0000000..18cce48 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32lppc.sh @@ -0,0 +1,5 @@ +# If you change this file, please also look at files which source this one: +# elf32lppcsim.sh + +. ${srcdir}/emulparams/elf32ppc.sh +OUTPUT_FORMAT="elf32-powerpcle" diff --git a/binutils-2.21/ld/emulparams/elf32lppcnto.sh b/binutils-2.21/ld/emulparams/elf32lppcnto.sh new file mode 100644 index 0000000..c45260d --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32lppcnto.sh @@ -0,0 +1,5 @@ +. ${srcdir}/emulparams/elf32ppc.sh +OUTPUT_FORMAT="elf32-powerpcle" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TEXT_START_ADDR=0x48040000 + diff --git a/binutils-2.21/ld/emulparams/elf32lppcsim.sh b/binutils-2.21/ld/emulparams/elf32lppcsim.sh new file mode 100644 index 0000000..e743852 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32lppcsim.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf32lppc.sh +TEXT_START_ADDR=0x10000000 diff --git a/binutils-2.21/ld/emulparams/elf32lsmip.sh b/binutils-2.21/ld/emulparams/elf32lsmip.sh new file mode 100644 index 0000000..62e4f98 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32lsmip.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf32lmip.sh +ENTRY=__start diff --git a/binutils-2.21/ld/emulparams/elf32ltsmip.sh b/binutils-2.21/ld/emulparams/elf32ltsmip.sh new file mode 100644 index 0000000..4a660f0 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ltsmip.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf32btsmip.sh +OUTPUT_FORMAT="elf32-tradlittlemips" diff --git a/binutils-2.21/ld/emulparams/elf32ltsmipn32.sh b/binutils-2.21/ld/emulparams/elf32ltsmipn32.sh new file mode 100644 index 0000000..276477d --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ltsmipn32.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf32btsmipn32.sh +OUTPUT_FORMAT="elf32-ntradlittlemips" +BIG_OUTPUT_FORMAT="elf32-ntradbigmips" +LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips" diff --git a/binutils-2.21/ld/emulparams/elf32m32c.sh b/binutils-2.21/ld/emulparams/elf32m32c.sh new file mode 100644 index 0000000..eaf2c4e --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32m32c.sh @@ -0,0 +1,26 @@ +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-m32c" +# See also `include/elf/m32c.h' +TEXT_START_ADDR=0x2000 +ARCH=m32c +ENTRY=_start +EMBEDDED=yes +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=needrelax +ELFSIZE=32 +MAXPAGESIZE=256 +# This is like setting STACK_ADDR to 0x0073FFFF0, except that the setting can +# be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra +# sentinal value at the bottom. +# N.B. We can't use PROVIDE to set the default value in a symbol because +# the address is needed to place the .stack section, which in turn is needed +# to hold the sentinel value(s). +test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" .stack ${RELOCATING-0}${RELOCATING+(DEFINED(__stack) ? __stack : 0x7fc)} : + { + ${RELOCATING+__stack = .;} + *(.stack) + LONG(0xdeaddead) + }" +# We do not need .stack for shared library. +test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" diff --git a/binutils-2.21/ld/emulparams/elf32mb_linux.sh b/binutils-2.21/ld/emulparams/elf32mb_linux.sh new file mode 100644 index 0000000..3503bb1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32mb_linux.sh @@ -0,0 +1,17 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-microblaze" +TEXT_START_ADDR=0x10000000 +NONPAGED_TEXT_START_ADDR=0x28 +ALIGNMENT=4 +MAXPAGESIZE=0x1000 +COMMONPAGESIZE=0x1000 +ARCH=microblaze + +NOP=0x80000000 + +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes +SEPARATE_GOTPLT=12 + diff --git a/binutils-2.21/ld/emulparams/elf32mcore.sh b/binutils-2.21/ld/emulparams/elf32mcore.sh new file mode 100644 index 0000000..6047950 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32mcore.sh @@ -0,0 +1,59 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-mcore-little" +BIG_OUTPUT_FORMAT="elf32-mcore-big" +LITTLE_OUTPUT_FORMAT="elf32-mcore-little" +NO_REL_RELOCS=yes +PAGE_SIZE=0x1000 +TARGET_PAGE_SIZE=0x400 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TEXT_START_ADDR=0 +ARCH=mcore +EMBEDDED=yes + +# There is a problem with the NOP value - it must work for both +# big endian and little endian systems. Unfortunately there is +# no symmetrical mcore opcode that functions as a noop. The +# chosen solution is to use "tst r0, r14". This is a symetrical +# value, and apart from the corruption of the C bit, it has no other +# side effects. Since the carry bit is never tested without being +# explicitly set first, and since the NOP code is only used as a +# fill value between independantly viable peices of code, it should +# not matter. +NOP=0x0e0e0e0e + +OTHER_BSS_SYMBOLS="__bss_start__ = . ;" +OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;" + +# This sets the stack to the top of the simulator memory (2^19 bytes). +STACK_ADDR=0x80000 + +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +# This code gets inserted into the generic elf32.sc linker script +# and allows us to define our own command line switches. +PARSE_AND_LIST_PROLOGUE=' +#define OPTION_BASE_FILE 300 +' + +PARSE_AND_LIST_LONGOPTS=' + {"base-file", required_argument, NULL, OPTION_BASE_FILE}, +' + +PARSE_AND_LIST_OPTIONS=' + fprintf (file, _(" --base_file <basefile>\n")); + fprintf (file, _("\t\t\tGenerate a base file for relocatable DLLs\n")); +' + +PARSE_AND_LIST_ARGS_CASES=' + case OPTION_BASE_FILE: + link_info.base_file = fopen (optarg, FOPEN_WB); + if (link_info.base_file == NULL) + { + /* xgettext:c-format */ + fprintf (stderr, _("%s: Cannot open base file %s\n"), + program_name, optarg); + xexit (1); + } + break; +' diff --git a/binutils-2.21/ld/emulparams/elf32mep.sh b/binutils-2.21/ld/emulparams/elf32mep.sh new file mode 100755 index 0000000..f72fe2a --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32mep.sh @@ -0,0 +1,55 @@ +MACHINE= +SCRIPT_NAME=mep +OUTPUT_FORMAT="elf32-mep-little" +TEXT_START_ADDR=0x1000 +ARCH=mep +MAXPAGESIZE=256 +ENTRY=_start +EMBEDDED=yes +TEMPLATE_NAME=elf32 +DATA_START_SYMBOLS='__data_start = . ;' +OTHER_GOT_SYMBOLS=' + . = ALIGN(4); + __sdabase = . + 0x8000; + .srodata : { *(.srodata) *(.srodata.*) *(.gnu.linkonce.srd.*) } +' +OTHER_SDATA_SECTIONS=' + PROVIDE (__sdabase = .); + __assert_tiny_size = ASSERT ((. < __sdabase) || ((. - __sdabase) <= 0x8000), + "tiny section overflow"); +' +OTHER_READONLY_SECTIONS=' + __stack = 0x001ffff0; + __stack_size = 0x100000; + __stack0 = (__stack - (0 * (__stack_size / 1)) + 15) / 16 * 16; + + .rostacktab : + { + /* Emit a table describing the location of the different stacks. + Only 1 processor in the default configuration. */ + . = ALIGN(4); + __stack_table = .; + LONG (__stack0); + } +' +OTHER_END_SYMBOLS=' + PROVIDE (__heap = _end); + PROVIDE (__heap_end = 0); +' +OTHER_TEXT_SECTIONS=' + *(.ftext) *(.ftext.*) *(.gnu.linkonce.ft.*) + . = ALIGN(8); + *(.vftext) *(.vftext.*) *(.gnu.linkonce.vf.*) + *(.frodata) *(.frodata.*) *(.gnu.linkonce.frd.*) +' +OTHER_READWRITE_SECTIONS=' + . = ALIGN(4); + __tpbase = .; + .based : { *(.based) *(.based.*) *(.gnu.linkonce.based.*) } + __assert_based_size = ASSERT ((. - __tpbase) <= 0x80, "based section overflow"); + .far : { *(.far) *(.far.*) *(.gnu.linkonce.far.*) } +' +OTHER_BSS_SECTIONS=' + __assert_near_size = ASSERT (. <= 0x1000000, "near section overflow"); + .farbss : { PROVIDE (__farbss_start = .); *(.farbss) *(.farbss.*) PROVIDE (__farbss_end = .); } +' diff --git a/binutils-2.21/ld/emulparams/elf32microblaze.sh b/binutils-2.21/ld/emulparams/elf32microblaze.sh new file mode 100644 index 0000000..ccc20d1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32microblaze.sh @@ -0,0 +1,23 @@ +SCRIPT_NAME=elfmicroblaze +OUTPUT_FORMAT="elf32-microblaze" +#TEXT_START_ADDR=0 +NONPAGED_TEXT_START_ADDR=0x28 +ALIGNMENT=4 +MAXPAGESIZE=4 +ARCH=microblaze +EMBEDDED=yes + +NOP=0x80000000 + +# Hmmm, there's got to be a better way. This sets the stack to the +# top of the simulator memory (2^19 bytes). +#PAGE_SIZE=0x1000 +#DATA_ADDR=0x10000 +#OTHER_RELOCATING_SECTIONS='.stack 0x7000 : { _stack = .; *(.stack) }' +#$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} +#OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' + +TEMPLATE_NAME=elf32 +#GENERATE_SHLIB_SCRIPT=yes + + diff --git a/binutils-2.21/ld/emulparams/elf32mipswindiss.sh b/binutils-2.21/ld/emulparams/elf32mipswindiss.sh new file mode 100644 index 0000000..4f1148b --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32mipswindiss.sh @@ -0,0 +1,27 @@ +TEMPLATE_NAME=elf32 +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-bigmips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" +ARCH=mips +MACHINE= +EMBEDDED=yes +MAXPAGESIZE=0x40000 + +# The data below is taken from the windiss.dld linker script that comes with +# the Diab linker. +TEXT_START_ADDR=0x100000 +DATA_START_SYMBOLS='__DATA_ROM = .; __DATA_RAM = .;' +SDATA_START_SYMBOLS='_SDA_BASE_ = .; _gp = . + 0x7ff0;' +SDATA2_START_SYMBOLS='_SDA2_BASE_ = .;' +EXECUTABLE_SYMBOLS='__HEAP_START = .; __SP_INIT = 0x800000; __SP_END = __SP_INIT - 0x20000; __HEAP_END = __SP_END; __DATA_END = _edata; __BSS_START = __bss_start; __BSS_END = _end; __HEAP_START = _end;' + +# The Diab tools use a different init/fini convention. Initialization code +# is place in sections named ".init$NN". These sections are then concatenated +# into the .init section. It is important that .init$00 be first and .init$99 +# be last. The other sections should be sorted, but the current linker script +# parse does not seem to allow that with the SORT keyword in this context. +INIT_START='*(.init$00); *(.init$0[1-9]); *(.init$[1-8][0-9]); *(.init$9[0-8])' +INIT_END='*(.init$99)' +FINI_START='*(.fini$00); *(.fini$0[1-9]); *(.fini$[1-8][0-9]); *(.fini$9[0-8])' +FINI_END='*(.fini$99)' diff --git a/binutils-2.21/ld/emulparams/elf32moxie.sh b/binutils-2.21/ld/emulparams/elf32moxie.sh new file mode 100644 index 0000000..a1f9e45 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32moxie.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-moxie" +TEXT_START_ADDR=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=moxie +STACK_ADDR=0x400000 diff --git a/binutils-2.21/ld/emulparams/elf32mt.sh b/binutils-2.21/ld/emulparams/elf32mt.sh new file mode 100644 index 0000000..04fc1ed --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32mt.sh @@ -0,0 +1,26 @@ +MACHINE= +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-mt" +# See also `include/elf/mt.h' +TEXT_START_ADDR=0x2000 +ARCH=mt +ENTRY=_start +EMBEDDED=yes +ELFSIZE=32 +MAXPAGESIZE=256 +# This is like setting STACK_ADDR to 0x0073FFFF0, except that the setting can +# be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra +# sentinal value at the bottom. +# N.B. We can't use PROVIDE to set the default value in a symbol because +# the address is needed to place the .stack section, which in turn is needed +# to hold the sentinel value(s). +test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" .stack ${RELOCATING-0}${RELOCATING+(DEFINED(__stack) ? __stack : 0x007FFFF0)} : + { + ${RELOCATING+__stack = .;} + *(.stack) + LONG(0xdeaddead) + }" +# We do not need .stack for shared library. +test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" diff --git a/binutils-2.21/ld/emulparams/elf32openrisc.sh b/binutils-2.21/ld/emulparams/elf32openrisc.sh new file mode 100755 index 0000000..bbe9a3e --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32openrisc.sh @@ -0,0 +1,11 @@ +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-openrisc" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x10000 +ARCH=openrisc +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ENTRY=_start +EMBEDDED=yes +NOP=0x15000000 + diff --git a/binutils-2.21/ld/emulparams/elf32ppc.sh b/binutils-2.21/ld/emulparams/elf32ppc.sh new file mode 100644 index 0000000..e638815 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ppc.sh @@ -0,0 +1,25 @@ +# If you change this file, please also look at files which source this one: +# elf32lppcnto.sh elf32lppc.sh elf32ppclinux.sh elf32ppcnto.sh +# elf32ppcsim.sh + +. ${srcdir}/emulparams/elf32ppccommon.sh +# Yes, we want duplicate .got and .plt sections. The linker chooses the +# appropriate one magically in ppc_after_open +DATA_GOT= +SDATA_GOT= +SEPARATE_GOTPLT=0 +BSS_PLT= +GOT=".got ${RELOCATING-0} : SPECIAL { *(.got) }" +GOTPLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }" +PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) } + .iplt ${RELOCATING-0} : { *(.iplt) }" +OTHER_TEXT_SECTIONS="*(.glink)" +EXTRA_EM_FILE=ppc32elf +if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then +# crt1.o defines data_start and __data_start. Keep them first. +# Next put all the .data.spehandle sections, with a trailing zero word. + DATA_START_SYMBOLS="${RELOCATING+*crt1.o(.data .data.* .gnu.linkonce.d.*) + PROVIDE (__spe_handle = .); + *(.data.spehandle) + . += 4 * (DEFINED (__spe_handle) || . != 0);}" +fi diff --git a/binutils-2.21/ld/emulparams/elf32ppc_fbsd.sh b/binutils-2.21/ld/emulparams/elf32ppc_fbsd.sh new file mode 100644 index 0000000..2bac85c --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ppc_fbsd.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf32ppc.sh +. ${srcdir}/emulparams/elf_fbsd.sh diff --git a/binutils-2.21/ld/emulparams/elf32ppccommon.sh b/binutils-2.21/ld/emulparams/elf32ppccommon.sh new file mode 100644 index 0000000..15cb3b1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ppccommon.sh @@ -0,0 +1,50 @@ +# The PLT-agnostic parts of a generic 32-bit ELF PowerPC target. Included by: +# elf32ppc.sh elf32ppcvxworks.sh +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-powerpc" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x01800000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH=powerpc:common +MACHINE= +EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' +if test -z "${CREATE_SHLIB}"; then + SDATA_START_SYMBOLS="PROVIDE (_SDA_BASE_ = 32768);" + SDATA2_START_SYMBOLS="PROVIDE (_SDA2_BASE_ = 32768);" + SBSS_START_SYMBOLS="PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);" + SBSS_END_SYMBOLS="PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);" +else + unset SDATA_START_SYMBOLS + unset SDATA2_START_SYMBOLS + unset SBSS_START_SYMBOLS + unset SBSS_END_SYMBOLS +fi +OTHER_END_SYMBOLS="__end = .;" +OTHER_RELRO_SECTIONS=" + .fixup ${RELOCATING-0} : { *(.fixup) } + .got1 ${RELOCATING-0} : { *(.got1) } + .got2 ${RELOCATING-0} : { *(.got2) } +" +OTHER_GOT_RELOC_SECTIONS=" + .rela.got1 ${RELOCATING-0} : { *(.rela.got1) } + .rela.got2 ${RELOCATING-0} : { *(.rela.got2) } +" + +# Treat a host that matches the target with the possible exception of "64" +# in the name as if it were native. +if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + ;; + esac +fi + +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. +case "$EMULATION_NAME" in + *64*) LIBPATH_SUFFIX=64 ;; +esac diff --git a/binutils-2.21/ld/emulparams/elf32ppclinux.sh b/binutils-2.21/ld/emulparams/elf32ppclinux.sh new file mode 100644 index 0000000..262731a --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ppclinux.sh @@ -0,0 +1,8 @@ +. ${srcdir}/emulparams/elf32ppc.sh +TEXT_START_ADDR=0x10000000 +unset EXECUTABLE_SYMBOLS +unset OTHER_END_SYMBOLS +test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }" +OTHER_RELRO_SECTIONS=" + .got1 ${RELOCATING-0} : { *(.got1) } + .got2 ${RELOCATING-0} : { *(.got2) }" diff --git a/binutils-2.21/ld/emulparams/elf32ppcnto.sh b/binutils-2.21/ld/emulparams/elf32ppcnto.sh new file mode 100644 index 0000000..d0b3e3d --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ppcnto.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf32ppc.sh +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TEXT_START_ADDR=0x48040000 + diff --git a/binutils-2.21/ld/emulparams/elf32ppcsim.sh b/binutils-2.21/ld/emulparams/elf32ppcsim.sh new file mode 100644 index 0000000..c3466cf --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ppcsim.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf32ppc.sh +TEXT_START_ADDR=0x10000000 diff --git a/binutils-2.21/ld/emulparams/elf32ppcvxworks.sh b/binutils-2.21/ld/emulparams/elf32ppcvxworks.sh new file mode 100644 index 0000000..1bc3f30 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ppcvxworks.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf32ppccommon.sh +OUTPUT_FORMAT="elf32-powerpc-vxworks" +. ${srcdir}/emulparams/vxworks.sh diff --git a/binutils-2.21/ld/emulparams/elf32ppcwindiss.sh b/binutils-2.21/ld/emulparams/elf32ppcwindiss.sh new file mode 100644 index 0000000..b40d782 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32ppcwindiss.sh @@ -0,0 +1,24 @@ +TEMPLATE_NAME=elf32 +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-powerpc" +NO_REL_RELOCS=yes +ARCH=powerpc +MACHINE= +EMBEDDED=yes +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" + +# The data below is taken from the windiss.dld linker script that comes with +# the Diab linker. +TEXT_START_ADDR=0x100000 +DATA_START_SYMBOLS='__DATA_ROM = .; __DATA_RAM = .;' +EXECUTABLE_SYMBOLS='__HEAP_START = .; __SP_INIT = 0x800000; __SP_END = __SP_INIT - 0x20000; __HEAP_END = __SP_END; __DATA_END = _edata; __BSS_START = __bss_start; __BSS_END = _end; __HEAP_START = _end;' + +# The Diab tools use a different init/fini convention. Initialization code +# is place in sections named ".init$NN". These sections are then concatenated +# into the .init section. It is important that .init$00 be first and .init$99 +# be last. The other sections should be sorted, but the current linker script +# parse does not seem to allow that with the SORT keyword in this context. +INIT_START='*(.init$00); *(.init$0[1-9]); *(.init$[1-8][0-9]); *(.init$9[0-8])' +INIT_END='*(.init$99)' +FINI_START='*(.fini$00); *(.fini$0[1-9]); *(.fini$[1-8][0-9]); *(.fini$9[0-8])' +FINI_END='*(.fini$99)' diff --git a/binutils-2.21/ld/emulparams/elf32rx.sh b/binutils-2.21/ld/emulparams/elf32rx.sh new file mode 100644 index 0000000..729b4b3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32rx.sh @@ -0,0 +1,32 @@ +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-rx-le" +# See also `include/elf/rx.h' +TEXT_START_ADDR=0x10000000 +ARCH=rx +ENTRY=_start +EMBEDDED=yes +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=rxelf +# EXTRA_EM_FILE=needrelax +ELFSIZE=32 +MAXPAGESIZE=256 +# This is like setting STACK_ADDR to 0xbffffffc, except that the setting can +# be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra +# sentinal value at the bottom. +# N.B. We can't use PROVIDE to set the default value in a symbol because +# the address is needed to place the .stack section, which in turn is needed +# to hold the sentinel value(s). +test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" .stack ${RELOCATING-0}${RELOCATING+(DEFINED(__stack) ? __stack : 0xbffffffc)} : + { + ${RELOCATING+__stack = .;} + *(.stack) + LONG(0xdeaddead) + }" +# We do not need .stack for shared library. +test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" + +OTHER_TEXT_SECTIONS='*(P)' +OTHER_READONLY_SECTIONS='C_1 : { *(C_1) } C_2 : { *(C_2) } C : { *(C) }' +OTHER_READWRITE_SECTIONS='D_1 : { *(D_1) } D_2 : { *(D_2) } D : { *(D) }' +OTHER_BSS_SECTIONS='B_1 : { *(B_1) } B_2 : { *(B_2) } B : { *(B) }' diff --git a/binutils-2.21/ld/emulparams/elf32vax.sh b/binutils-2.21/ld/emulparams/elf32vax.sh new file mode 100644 index 0000000..9ddc754 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32vax.sh @@ -0,0 +1,14 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-vax" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x10000 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=vax +MACHINE= +NOP=0x0101 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/elf32xc16x.sh b/binutils-2.21/ld/emulparams/elf32xc16x.sh new file mode 100644 index 0000000..f88ccee --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32xc16x.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=elf32xc16x +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-xc16x" +TEXT_START_ADDR=0x00400 +ARCH=xc16x +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ENTRY=_start +EMBEDDED=yes diff --git a/binutils-2.21/ld/emulparams/elf32xc16xl.sh b/binutils-2.21/ld/emulparams/elf32xc16xl.sh new file mode 100644 index 0000000..14eb24b --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32xc16xl.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=elf32xc16xl +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-xc16x" +TEXT_START_ADDR=0xc00300 +ARCH=xc16x:xc16xl +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ENTRY=_start +EMBEDDED=yes diff --git a/binutils-2.21/ld/emulparams/elf32xc16xs.sh b/binutils-2.21/ld/emulparams/elf32xc16xs.sh new file mode 100644 index 0000000..2454963 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32xc16xs.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=elf32xc16xs +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-xc16x" +TEXT_START_ADDR=0xc00300 +ARCH=xc16x:xc16xs +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ENTRY=_start +EMBEDDED=yes diff --git a/binutils-2.21/ld/emulparams/elf32xstormy16.sh b/binutils-2.21/ld/emulparams/elf32xstormy16.sh new file mode 100644 index 0000000..a512ec3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32xstormy16.sh @@ -0,0 +1,13 @@ +MACHINE= +SCRIPT_NAME=xstormy16 +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=needrelax +OUTPUT_FORMAT="elf32-xstormy16" +# See also `include/elf/xstormy16.h' +ARCH=xstormy16 +ALIGNMENT=2 +ENTRY=_start +EMBEDDED=yes +NOP=0 + + diff --git a/binutils-2.21/ld/emulparams/elf32xtensa.sh b/binutils-2.21/ld/emulparams/elf32xtensa.sh new file mode 100644 index 0000000..72ba2bb --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf32xtensa.sh @@ -0,0 +1,45 @@ +SCRIPT_NAME=elfxtensa +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=xtensaelf +OUTPUT_FORMAT=undefined +BIG_OUTPUT_FORMAT="elf32-xtensa-be" +LITTLE_OUTPUT_FORMAT="elf32-xtensa-le" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=xtensa +MACHINE= +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +GENERATE_COMBRELOC_SCRIPT=yes +NO_SMALL_DATA=yes +TEXT_PLT=yes +PLT="/* .plt* sections are embedded in .text */" +GOT=".got ${RELOCATING-0} : { *(.got) }" +OTHER_READONLY_SECTIONS=" + .got.loc ${RELOCATING-0} : { *(.got.loc) } + .xt_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.xt_except_table${RELOCATING+ .xt_except_table.* .gnu.linkonce.e.*})) } +" +OTHER_RELRO_SECTIONS=" + .xt_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.xt_except_table${RELOCATING+ .xt_except_table.* .gnu.linkonce.e.*})) } +" +OTHER_READWRITE_SECTIONS=" + .xt_except_desc ${RELOCATING-0} : + { + *(.xt_except_desc${RELOCATING+ .xt_except_desc.* .gnu.linkonce.h.*}) + ${RELOCATING+*(.xt_except_desc_end)} + } +" +OTHER_SDATA_SECTIONS=" + .lit4 ${RELOCATING-0} : + { + ${RELOCATING+PROVIDE (_lit4_start = .);} + *(.lit4${RELOCATING+ .lit4.* .gnu.linkonce.lit4.*}) + ${RELOCATING+PROVIDE (_lit4_end = .);} + } +" +OTHER_SECTIONS=" + .xt.lit 0 : { KEEP (*(.xt.lit${RELOCATING+ .xt.lit.* .gnu.linkonce.p.*})) } + .xt.insn 0 : { KEEP (*(.xt.insn${RELOCATING+ .gnu.linkonce.x.*})) } + .xt.prop 0 : { KEEP (*(.xt.prop${RELOCATING+ .xt.prop.* .gnu.linkonce.prop.*})) } +" diff --git a/binutils-2.21/ld/emulparams/elf64_aix.sh b/binutils-2.21/ld/emulparams/elf64_aix.sh new file mode 100644 index 0000000..39325f5 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64_aix.sh @@ -0,0 +1,21 @@ +# See genscripts.sh and ../scripttempl/elf.sc for the meaning of these. +SCRIPT_NAME=elf +ELFSIZE=64 +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf64-ia64-aix-little" +ARCH=ia64 +MACHINE= +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +TEXT_START_ADDR="0x10000000" +DATA_ADDR="ALIGN (0x10000000) + (. & (${MAXPAGESIZE} - 1))" +GENERATE_SHLIB_SCRIPT=yes +NOP=0x00300000010070000002000001000400 # a bundle full of nops +OTHER_GOT_SECTIONS=" + .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }" +OTHER_PLT_RELOC_SECTIONS=" + .rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }" +OTHER_READONLY_SECTIONS=" + .opd ${RELOCATING-0} : { *(.opd) } + .IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info*${RELOCATING+ .gnu.linkonce.ia64unwi.*}) } + .IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind*${RELOCATING+ .gnu.linkonce.ia64unw.*}) }" +LIB_PATH="=/usr/lib/ia64l64:=/usr/lib:=/usr/local/lib" diff --git a/binutils-2.21/ld/emulparams/elf64_ia64.sh b/binutils-2.21/ld/emulparams/elf64_ia64.sh new file mode 100644 index 0000000..7e5e54d --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64_ia64.sh @@ -0,0 +1,39 @@ +# See genscripts.sh and ../scripttempl/elf.sc for the meaning of these. +SCRIPT_NAME=elf +ELFSIZE=64 +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=ia64elf +OUTPUT_FORMAT="elf64-ia64-little" +ARCH=ia64 +MACHINE= +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +# FIXME: It interferes with linker relaxation. Disable it until it is +# fixed. +if test "0" = "1" -a -n "$CREATE_SHLIB"; then + # Optimize shared libraries for 16K page size + COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +fi +TEXT_START_ADDR="0x4000000000000000" +DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))" +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NOP=0x00300000010070000002000001000400 # a bundle full of nops +OTHER_GOT_SECTIONS=" + .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }" +OTHER_PLT_RELOC_SECTIONS=" + .rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }" +OTHER_READONLY_SECTIONS= +OTHER_READWRITE_SECTIONS= +test -z "$CREATE_PIE" && OTHER_READONLY_SECTIONS=" + .opd ${RELOCATING-0} : { *(.opd) }" +test -n "$CREATE_PIE" && OTHER_READWRITE_SECTIONS=" + .opd ${RELOCATING-0} : { *(.opd) }" +test -n "$CREATE_PIE" && OTHER_GOT_RELOC_SECTIONS=" + .rela.opd ${RELOCATING-0} : { *(.rela.opd) }" +OTHER_READONLY_SECTIONS="${OTHER_READONLY_SECTIONS} + .IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info${RELOCATING+* .gnu.linkonce.ia64unwi.*}) } + .IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind${RELOCATING+* .gnu.linkonce.ia64unw.*}) }" +# Intel C++ compiler, prior to 9.0, puts small data in .ctors and +# .dtors. They have to be next to .sbss/.sbss2/.sdata/.sdata2. +SMALL_DATA_CTOR=" " +SMALL_DATA_DTOR=" " diff --git a/binutils-2.21/ld/emulparams/elf64_ia64_fbsd.sh b/binutils-2.21/ld/emulparams/elf64_ia64_fbsd.sh new file mode 100644 index 0000000..ab7e78f --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64_ia64_fbsd.sh @@ -0,0 +1,6 @@ +. ${srcdir}/emulparams/elf64_ia64.sh +TEXT_START_ADDR="0x2000000000000000" +unset DATA_ADDR +unset SMALL_DATA_CTOR +unset SMALL_DATA_DTOR +. ${srcdir}/emulparams/elf_fbsd.sh diff --git a/binutils-2.21/ld/emulparams/elf64_s390.sh b/binutils-2.21/ld/emulparams/elf64_s390.sh new file mode 100644 index 0000000..ae8f26e --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64_s390.sh @@ -0,0 +1,35 @@ +SCRIPT_NAME=elf +ELFSIZE=64 +OUTPUT_FORMAT="elf64-s390" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x80000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH="s390:64-bit" +MACHINE= +NOP=0x07070707 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes + +# Treat a host that matches the target with the possible exception of "x" +# in the name as if it were native. +if test `echo "$host" | sed -e s/390x/390/` \ + = `echo "$target" | sed -e s/390x/390/`; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + esac +fi + +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first +# on Linux. +case "$target" in + s390*-linux*) + case "$EMULATION_NAME" in + *64*) + LIBPATH_SUFFIX=64 ;; + esac + ;; +esac diff --git a/binutils-2.21/ld/emulparams/elf64_sparc.sh b/binutils-2.21/ld/emulparams/elf64_sparc.sh new file mode 100644 index 0000000..9397b87 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64_sparc.sh @@ -0,0 +1,50 @@ +SCRIPT_NAME=elf +ELFSIZE=64 +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf64-sparc" +NO_REL_RELOCS=yes +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH="sparc:v9" +MACHINE= +DATA_PLT= +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NOP=0x01000000 +NO_SMALL_DATA=yes + +case "$target" in + sparc*-solaris*) + TEXT_START_ADDR=0x100000000 + ;; + *) + TEXT_START_ADDR=0x100000 + ;; +esac + +# Treat a host that matches the target with the possible exception of "64" +# and "v7", "v8", "v9" in the name as if it were native. +if test `echo "$host" | sed -e 's/64//;s/v[789]//'` \ + = `echo "$target" | sed -e 's/64//;s/v[789]//'`; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + ;; + esac +fi + +# Linux and Solaris modify the default library search path +# to first include a 64-bit specific directory. It's put +# in slightly different places on the two systems. +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first +# on Linux and /lib/sparcv9, /usr/lib/sparcv9 etc. on Solaris. +case "$EMULATION_NAME" in + *64*) + case "$target" in + sparc*-linux*) + LIBPATH_SUFFIX=64 ;; + sparc*-solaris*) + LIBPATH_SUFFIX=/sparcv9 ;; + esac + ;; +esac diff --git a/binutils-2.21/ld/emulparams/elf64_sparc_fbsd.sh b/binutils-2.21/ld/emulparams/elf64_sparc_fbsd.sh new file mode 100644 index 0000000..21d13ab --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64_sparc_fbsd.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf64_sparc.sh +. ${srcdir}/emulparams/elf_fbsd.sh + +OUTPUT_FORMAT="elf64-sparc-freebsd" diff --git a/binutils-2.21/ld/emulparams/elf64_sparc_sol2.sh b/binutils-2.21/ld/emulparams/elf64_sparc_sol2.sh new file mode 100644 index 0000000..2fad634 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64_sparc_sol2.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf64_sparc.sh +. ${srcdir}/emulparams/solaris2.sh +EXTRA_EM_FILE=solaris2 +OUTPUT_FORMAT="elf64-sparc-sol2" diff --git a/binutils-2.21/ld/emulparams/elf64alpha.sh b/binutils-2.21/ld/emulparams/elf64alpha.sh new file mode 100644 index 0000000..82f505d --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64alpha.sh @@ -0,0 +1,27 @@ +ENTRY=_start +SCRIPT_NAME=elf +ELFSIZE=64 +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=alphaelf +OUTPUT_FORMAT="elf64-alpha" +NO_REL_RELOCS=yes +TEXT_START_ADDR="0x120000000" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH=alpha +MACHINE= +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes + +# Yes, we want duplicate .plt sections. The linker chooses the +# appropriate one magically in alpha_after_open. +PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }" +DATA_PLT=yes +TEXT_PLT=yes + +# Note that the number is always big-endian, thus we have to +# reverse the digit string. +NOP=0x0000fe2f1f04ff47 # unop; nop + +OTHER_READONLY_SECTIONS=" + .reginfo ${RELOCATING-0} : { *(.reginfo) }" diff --git a/binutils-2.21/ld/emulparams/elf64alpha_fbsd.sh b/binutils-2.21/ld/emulparams/elf64alpha_fbsd.sh new file mode 100644 index 0000000..fd4a0a4 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64alpha_fbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf64alpha.sh +. ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf64-alpha-freebsd" diff --git a/binutils-2.21/ld/emulparams/elf64alpha_nbsd.sh b/binutils-2.21/ld/emulparams/elf64alpha_nbsd.sh new file mode 100644 index 0000000..8116f48 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64alpha_nbsd.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/elf64alpha.sh +ENTRY=__start diff --git a/binutils-2.21/ld/emulparams/elf64bmip-defs.sh b/binutils-2.21/ld/emulparams/elf64bmip-defs.sh new file mode 100644 index 0000000..110f892 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64bmip-defs.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf32bmipn32-defs.sh +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }" diff --git a/binutils-2.21/ld/emulparams/elf64bmip.sh b/binutils-2.21/ld/emulparams/elf64bmip.sh new file mode 100755 index 0000000..0df6528 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64bmip.sh @@ -0,0 +1,23 @@ +. ${srcdir}/emulparams/elf64bmip-defs.sh +OUTPUT_FORMAT="elf64-bigmips" +BIG_OUTPUT_FORMAT="elf64-bigmips" +LITTLE_OUTPUT_FORMAT="elf64-littlemips" +SHLIB_TEXT_START_ADDR=0x3ffffe0000 + +# IRIX6 defines these symbols. 0x40 is the size of the ELF header. +EXECUTABLE_SYMBOLS=" + __dso_displacement = 0; + ${CREATE_SHLIB-${CREATE_PIE-__elf_header = ${TEXT_START_ADDR};}} + ${CREATE_SHLIB+__elf_header = ${SHLIB_TEXT_START_ADDR};} + ${CREATE_PIE+__elf_header = ${SHLIB_TEXT_START_ADDR};} + __program_header_table = __elf_header + 0x40; +" + +# There are often dynamic relocations against the .rodata section. +# Setting DT_TEXTREL in the .dynamic section does not convince the +# IRIX6 linker to permit relocations against the text segment. +# Following the IRIX linker, we simply put .rodata in the data +# segment. +WRITABLE_RODATA= + +EXTRA_EM_FILE=irix diff --git a/binutils-2.21/ld/emulparams/elf64btsmip.sh b/binutils-2.21/ld/emulparams/elf64btsmip.sh new file mode 100644 index 0000000..b9e80bb --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64btsmip.sh @@ -0,0 +1,16 @@ +# If you change this file, please also look at files which source this one: +# elf64ltsmip.sh + +. ${srcdir}/emulparams/elf64bmip-defs.sh +OUTPUT_FORMAT="elf64-tradbigmips" +BIG_OUTPUT_FORMAT="elf64-tradbigmips" +LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips" + +# Magic sections. +OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)' +OTHER_SECTIONS=' + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +' + +TEXT_START_ADDR="0x120000000" diff --git a/binutils-2.21/ld/emulparams/elf64hppa.sh b/binutils-2.21/ld/emulparams/elf64hppa.sh new file mode 100755 index 0000000..eeeadea --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64hppa.sh @@ -0,0 +1,76 @@ +SCRIPT_NAME=elf64hppa +ELFSIZE=64 +OUTPUT_FORMAT="elf64-hppa" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x4000000000001000 +DATA_ADDR=0x8000000000001000 +TARGET_PAGE_SIZE=4096 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +LIB_PATH="=/usr/lib/pa20_64:=/opt/langtools/lib/pa20_64" + +# The HP dynamic linker actually requires you set the start of text and +# data to some reasonable value. Of course nobody knows what reasoanble +# really is, so we just use the same values that HP's linker uses. +SHLIB_TEXT_START_ADDR=0x4000000000001000 +SHLIB_DATA_ADDR=0x8000000000001000 + +ARCH=hppa +MACHINE=hppa2.0w +ENTRY="main" +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +# We really want multiple .stub sections, one for each input .text section, +# but for now this is good enough. +OTHER_READONLY_SECTIONS=" + .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }" + +# The PA64 ELF port treats .plt sections differently than most. We also have +# to create a .opd section. What most systems call the .got, we call the .dlt +OTHER_READWRITE_SECTIONS=" + .PARISC.pfa_count ${RELOCATING-0} : { *(.PARISC.pfa_count) } + .PARISC.global ${RELOCATING-0} : { *(.PARISC.global) } + .opd ${RELOCATING-0} : { *(.opd) } + ${RELOCATING+PROVIDE (__gp = .);} + .plt ${RELOCATING-0} : { *(.plt) } + .dlt ${RELOCATING-0} : { *(.dlt) }" + +# The PA64 ELF port has an additional huge bss section. +OTHER_BSS_SECTIONS=" + .PARISC.ansi.common ${RELOCATING-0} : { *(.PARISC.ansi.common) } + .PARISC.huge.common ${RELOCATING-0} : { *(.PARISC.huge.common) } + .hbss ${RELOCATING-0} : { *(.hbss) } + .tbss ${RELOCATING-0} : { *(.tbss) }" + +#OTHER_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));' +OTHER_SYMBOLS=' + PROVIDE (__TLS_SIZE = 0); + PROVIDE (__TLS_INIT_SIZE = 0); + PROVIDE (__TLS_INIT_START = 0); + PROVIDE (__TLS_INIT_A = 0); + PROVIDE (__TLS_PREALLOC_DTV_A = 0);' + +# HPs use .dlt where systems use .got. Sigh. +OTHER_GOT_RELOC_SECTIONS=" + .rela.dlt ${RELOCATING-0} : { *(.rela.dlt) } + .rela.opd ${RELOCATING-0} : { *(.rela.opd) }" + +# We're not actually providing a symbol anymore (due to the inability to be +# safe in regards to shared libraries). So we just allocate the hunk of space +# unconditionally, but do not mess around with the symbol table. +DATA_START_SYMBOLS='. += 16;' + +DATA_PLT= +PLT_BEFORE_GOT= + +# .dynamic should be at the start of the .text segment. +TEXT_DYNAMIC= + +# The linker is required to define these two symbols. +EXECUTABLE_SYMBOLS='PROVIDE (__SYSTEM_ID = 0x214); PROVIDE (_FPU_STATUS = 0x0);' +# The PA64 ELF port needs two additional initializer sections and also wants +# a start/end symbol pair for the .init and .fini sections. +INIT_START='KEEP (*(.HP.init)); PROVIDE (__preinit_start = .); KEEP (*(.preinit)); PROVIDE (__preinit_end = .); PROVIDE (__init_start = .);' +INIT_END='PROVIDE (__init_end = .);' +FINI_START='PROVIDE (__fini_start = .);' +FINI_END='PROVIDE (__fini_end = .);' diff --git a/binutils-2.21/ld/emulparams/elf64lppc.sh b/binutils-2.21/ld/emulparams/elf64lppc.sh new file mode 100644 index 0000000..1c47493 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64lppc.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf64ppc.sh +OUTPUT_FORMAT="elf64-powerpcle" +NOP=0x00000060 diff --git a/binutils-2.21/ld/emulparams/elf64ltsmip.sh b/binutils-2.21/ld/emulparams/elf64ltsmip.sh new file mode 100644 index 0000000..efd6b7d --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64ltsmip.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf64btsmip.sh +OUTPUT_FORMAT="elf64-tradlittlemips" +BIG_OUTPUT_FORMAT="elf64-tradbigmips" +LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips" diff --git a/binutils-2.21/ld/emulparams/elf64mmix.sh b/binutils-2.21/ld/emulparams/elf64mmix.sh new file mode 100644 index 0000000..bdb5d0a --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64mmix.sh @@ -0,0 +1,61 @@ +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +ELFSIZE=64 +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf64-mmix" +NO_REL_RELOCS=yes +ENTRY=_start. + +# Default to 0 as mmixal does. +TEXT_START_ADDR='DEFINED (__.MMIX.start..text) ? __.MMIX.start..text : 0' +# Don't add SIZEOF_HEADERS. +# Don't set EMBEDDED, that would be misleading; it's not that kind of system. +TEXT_BASE_ADDRESS=$TEXT_START_ADDR +DATA_ADDR='DEFINED (__.MMIX.start..data) ? __.MMIX.start..data : 0x2000000000000000' + +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=mmix +MACHINE= +COMPILE_IN=yes +EXTRA_EM_FILE=mmixelf + +# The existence of a symbol __start (or _start) should overrule Main, so +# it can be a user symbol without the associated mmixal magic. We +# also want to provide Main as a synonym for _start, if Main wasn't +# defined but is referred to, and _start was defined. +# +# The reason we use a symbol "_start." as a mediator is to avoid +# causing ld to force the type of _start to object rather than no +# type, which confuses disassembly; we also make it alphanumerically +# a successor of _start for similar reasons. Perhaps it's a linker +# bug that linker-defined symbols set the symbol-type. +# +# Note that we smuggle this into OTHER_TEXT_SECTIONS (at the end +# of .text) rather than TEXT_START_SYMBOLS. This is necessary, as +# DEFINED wouldn't find the symbol if it was at the top; presumably +# before the definition, if the definition is not in the first file. +# FIXME: Arguably a linker bug. +# Only do this for a final link, or else we'll mess up e.g. error +# messages. +OTHER_TEXT_SECTIONS=" +${RELOCATING+ + _start. = (DEFINED (_start) ? _start + : (DEFINED (Main) ? Main : (DEFINED (.text) ? .text : 0))); + PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.)); +}" + +OTHER_SECTIONS=' + .MMIX.reg_contents : + { + /* Note that this section always has a fixed VMA - that of its + first register * 8. */ + *(.MMIX.reg_contents.linker_allocated); + *(.MMIX.reg_contents); + } +' + +# FIXME: Also bit by the PROVIDE bug? If not, this could be +# EXECUTABLE_SYMBOLS. +# By default, put the high end of the stack where the register stack +# begins. They grow in opposite directions. */ +OTHER_SYMBOLS="PROVIDE (__Stack_start = 0x6000000000000000);" diff --git a/binutils-2.21/ld/emulparams/elf64ppc.sh b/binutils-2.21/ld/emulparams/elf64ppc.sh new file mode 100644 index 0000000..c9337ea --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf64ppc.sh @@ -0,0 +1,55 @@ +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=ppc64elf +ELFSIZE=64 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf64-powerpc" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x10000000 +#SEGMENT_SIZE=0x10000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH=powerpc:common64 +MACHINE= +NOP=0x60000000 +OTHER_TEXT_SECTIONS="*(.sfpr .glink)" +BSS_PLT= +OTHER_BSS_SYMBOLS=" + .tocbss ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.tocbss)}" +OTHER_PLT_RELOC_SECTIONS=" + .rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }" + +if test x${RELOCATING+set} = xset; then + GOT=" + .got : ALIGN(8) { *(.got .toc) }" +else + GOT=" + .got 0 : { *(.got) } + .toc 0 : { *(.toc) }" +fi +# Put .opd relocs first so ld.so will process them before any ifunc relocs. +INITIAL_RELOC_SECTIONS=" + .rela.opd ${RELOCATING-0} : { *(.rela.opd) }" +OTHER_GOT_RELOC_SECTIONS=" + .rela.toc ${RELOCATING-0} : { *(.rela.toc) } + .rela.branch_lt ${RELOCATING-0} : { *(.rela.branch_lt) }" +OTHER_READWRITE_SECTIONS=" + .toc1 ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) } + .opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) } + .branch_lt ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.branch_lt) }" + +# Treat a host that matches the target with the possible exception of "64" +# in the name as if it were native. +if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + ;; + esac +fi + +# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. +case "$EMULATION_NAME" in + *64*) LIBPATH_SUFFIX=64 ;; +esac diff --git a/binutils-2.21/ld/emulparams/elf_fbsd.sh b/binutils-2.21/ld/emulparams/elf_fbsd.sh new file mode 100644 index 0000000..2ea646e --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_fbsd.sh @@ -0,0 +1 @@ +ELF_INTERPRETER_NAME=\"/usr/libexec/ld-elf.so.1\" diff --git a/binutils-2.21/ld/emulparams/elf_i386.sh b/binutils-2.21/ld/emulparams/elf_i386.sh new file mode 100644 index 0000000..d480811 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_i386.sh @@ -0,0 +1,15 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x08048000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH=i386 +MACHINE= +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes +SEPARATE_GOTPLT=12 +IREL_IN_PLT= diff --git a/binutils-2.21/ld/emulparams/elf_i386_be.sh b/binutils-2.21/ld/emulparams/elf_i386_be.sh new file mode 100644 index 0000000..efe1a86 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_i386_be.sh @@ -0,0 +1,11 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x80000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i386 +MACHINE= +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/elf_i386_chaos.sh b/binutils-2.21/ld/emulparams/elf_i386_chaos.sh new file mode 100644 index 0000000..1322174 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_i386_chaos.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=elf_chaos +OUTPUT_FORMAT="elf32-i386" +TEXT_START_ADDR=0x40000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i386 +MACHINE= +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/elf_i386_fbsd.sh b/binutils-2.21/ld/emulparams/elf_i386_fbsd.sh new file mode 100644 index 0000000..2378598 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_i386_fbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf_i386.sh +. ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf32-i386-freebsd" diff --git a/binutils-2.21/ld/emulparams/elf_i386_ldso.sh b/binutils-2.21/ld/emulparams/elf_i386_ldso.sh new file mode 100644 index 0000000..4b0d3fb --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_i386_ldso.sh @@ -0,0 +1,12 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x08048000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i386 +MACHINE= +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\" +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/elf_i386_sol2.sh b/binutils-2.21/ld/emulparams/elf_i386_sol2.sh new file mode 100644 index 0000000..7c18fc6 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_i386_sol2.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf_i386_ldso.sh +. ${srcdir}/emulparams/solaris2.sh +EXTRA_EM_FILE=solaris2 +OUTPUT_FORMAT="elf32-i386-sol2" diff --git a/binutils-2.21/ld/emulparams/elf_i386_vxworks.sh b/binutils-2.21/ld/emulparams/elf_i386_vxworks.sh new file mode 100644 index 0000000..6933128 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_i386_vxworks.sh @@ -0,0 +1,14 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386-vxworks" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x08048000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH=i386 +MACHINE= +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes +. ${srcdir}/emulparams/vxworks.sh diff --git a/binutils-2.21/ld/emulparams/elf_l1om.sh b/binutils-2.21/ld/emulparams/elf_l1om.sh new file mode 100644 index 0000000..19eea97 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_l1om.sh @@ -0,0 +1,68 @@ +SCRIPT_NAME=elf +ELFSIZE=64 +OUTPUT_FORMAT="elf64-l1om" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH="l1om" +MACHINE= +COMPILE_IN=yes +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes +LARGE_SECTIONS=yes +SEPARATE_GOTPLT=24 + +if [ "x${host}" = "x${target}" ]; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + esac +fi + +# Linux modifies the default library search path to first include +# a 64-bit specific directory. +case "$target" in + l1om*-linux*) + case "$EMULATION_NAME" in + *l1om*) LIBPATH_SUFFIX=64 ;; + esac + ;; +esac +SCRIPT_NAME=elf +ELFSIZE=64 +OUTPUT_FORMAT="elf64-l1om" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH="l1om" +MACHINE= +COMPILE_IN=yes +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes +LARGE_SECTIONS=yes +SEPARATE_GOTPLT=24 + +if [ "x${host}" = "x${target}" ]; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + esac +fi + +# Linux modifies the default library search path to first include +# a 64-bit specific directory. +case "$target" in + l1om*-linux*) + case "$EMULATION_NAME" in + *l1om*) LIBPATH_SUFFIX=64 ;; + esac + ;; +esac diff --git a/binutils-2.21/ld/emulparams/elf_l1om_fbsd.sh b/binutils-2.21/ld/emulparams/elf_l1om_fbsd.sh new file mode 100644 index 0000000..a90f81e --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_l1om_fbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf_l1om.sh +. ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf64-l1om-freebsd" diff --git a/binutils-2.21/ld/emulparams/elf_s390.sh b/binutils-2.21/ld/emulparams/elf_s390.sh new file mode 100644 index 0000000..218558b --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_s390.sh @@ -0,0 +1,13 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-s390" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x00400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH="s390:31-bit" +MACHINE= +NOP=0x07070707 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/elf_x86_64.sh b/binutils-2.21/ld/emulparams/elf_x86_64.sh new file mode 100644 index 0000000..0e93ad8 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_x86_64.sh @@ -0,0 +1,38 @@ +SCRIPT_NAME=elf +ELFSIZE=64 +OUTPUT_FORMAT="elf64-x86-64" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH="i386:x86-64" +MACHINE= +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes +LARGE_SECTIONS=yes +SEPARATE_GOTPLT=24 +IREL_IN_PLT= + +if [ "x${host}" = "x${target}" ]; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + esac +fi + +# Linux/Solaris modify the default library search path to first include +# a 64-bit specific directory. +case "$target" in + x86_64*-linux*|i[3-7]86-*-linux-*) + case "$EMULATION_NAME" in + *64*) LIBPATH_SUFFIX=64 ;; + esac + ;; + *-*-solaris2*) + LIBPATH_SUFFIX=/amd64 + ELF_INTERPRETER_NAME=\"/lib/amd64/ld.so.1\" + ;; +esac diff --git a/binutils-2.21/ld/emulparams/elf_x86_64_fbsd.sh b/binutils-2.21/ld/emulparams/elf_x86_64_fbsd.sh new file mode 100644 index 0000000..35b6a62 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_x86_64_fbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf_x86_64.sh +. ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf64-x86-64-freebsd" diff --git a/binutils-2.21/ld/emulparams/elf_x86_64_sol2.sh b/binutils-2.21/ld/emulparams/elf_x86_64_sol2.sh new file mode 100644 index 0000000..993f458 --- /dev/null +++ b/binutils-2.21/ld/emulparams/elf_x86_64_sol2.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/elf_x86_64.sh +. ${srcdir}/emulparams/solaris2.sh +EXTRA_EM_FILE=solaris2 +OUTPUT_FORMAT="elf64-x86-64-sol2" diff --git a/binutils-2.21/ld/emulparams/gld960.sh b/binutils-2.21/ld/emulparams/gld960.sh new file mode 100644 index 0000000..1e03965 --- /dev/null +++ b/binutils-2.21/ld/emulparams/gld960.sh @@ -0,0 +1,7 @@ +SCRIPT_NAME=i960 +OUTPUT_FORMAT="" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=128 +ARCH=i960 +TEMPLATE_NAME=gld960 +GLD_STYLE=1 diff --git a/binutils-2.21/ld/emulparams/gld960coff.sh b/binutils-2.21/ld/emulparams/gld960coff.sh new file mode 100644 index 0000000..65b0dca --- /dev/null +++ b/binutils-2.21/ld/emulparams/gld960coff.sh @@ -0,0 +1,19 @@ +SCRIPT_NAME=i960 +OUTPUT_FORMAT="" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=128 +ARCH=i960 +TEMPLATE_NAME=gld960c +GLD_STYLE=1 +COFF_CTORS=' + ___CTOR_LIST__ = .; + LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2) + *(.ctors) + LONG(0) + ___CTOR_END__ = .; + ___DTOR_LIST__ = .; + LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2) + *(.dtors) + LONG(0) + ___DTOR_END__ = .; +' diff --git a/binutils-2.21/ld/emulparams/h8300.sh b/binutils-2.21/ld/emulparams/h8300.sh new file mode 100644 index 0000000..7042535 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300.sh @@ -0,0 +1,18 @@ +SCRIPT_NAME=h8300 +OUTPUT_FORMAT="coff-h8300" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8300 +TINY_READONLY_SECTION=".tinyrodata : + { + *(.tinyrodata) + } =0" +TINY_DATA_SECTION=".tinydata 0xff8000 : + { + *(.tinydata) + ${RELOCATING+ _tinydata = .; } + }" +TINY_BSS_SECTION=".tinybss : AT (_tinydata) + { + *(.tinybss) + }" diff --git a/binutils-2.21/ld/emulparams/h8300elf.sh b/binutils-2.21/ld/emulparams/h8300elf.sh new file mode 100644 index 0000000..38b8a36 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300elf.sh @@ -0,0 +1,26 @@ +# If you change this file, please also look at files which source this one: +# h8300helf.sh h8300self.sh + +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-h8300" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x100 +MAXPAGESIZE=2 +TARGET_PAGE_SIZE=128 +ARCH=h8300 +TEMPLATE_NAME=elf32 +EMBEDDED=yes +STACK_ADDR=0xfefc +TINY_READONLY_SECTION=".tinyrodata : + { + *(.tinyrodata) + } =0" +TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} : + { + *(.tinydata) + ${RELOCATING+ _tinydata = .; } + }" +TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)} + { + *(.tinybss) + }" diff --git a/binutils-2.21/ld/emulparams/h8300h.sh b/binutils-2.21/ld/emulparams/h8300h.sh new file mode 100644 index 0000000..3ab794e --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300h.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8300h +OUTPUT_FORMAT="coff-h8300" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8300 diff --git a/binutils-2.21/ld/emulparams/h8300helf.sh b/binutils-2.21/ld/emulparams/h8300helf.sh new file mode 100644 index 0000000..1cde35c --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300helf.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/h8300elf.sh +ARCH="h8300:h8300h" +STACK_ADDR=0x2fefc diff --git a/binutils-2.21/ld/emulparams/h8300hn.sh b/binutils-2.21/ld/emulparams/h8300hn.sh new file mode 100644 index 0000000..d349082 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300hn.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8300hn +OUTPUT_FORMAT="coff-h8300" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8300 diff --git a/binutils-2.21/ld/emulparams/h8300hnelf.sh b/binutils-2.21/ld/emulparams/h8300hnelf.sh new file mode 100644 index 0000000..4a75ff9 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300hnelf.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/h8300elf.sh +ARCH="h8300:h8300hn" diff --git a/binutils-2.21/ld/emulparams/h8300s.sh b/binutils-2.21/ld/emulparams/h8300s.sh new file mode 100644 index 0000000..e27b4f5 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300s.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8300s +OUTPUT_FORMAT="coff-h8300" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8300 diff --git a/binutils-2.21/ld/emulparams/h8300self.sh b/binutils-2.21/ld/emulparams/h8300self.sh new file mode 100644 index 0000000..7539eec --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300self.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/h8300elf.sh +ARCH="h8300:h8300s" +STACK_ADDR=0x2fefc diff --git a/binutils-2.21/ld/emulparams/h8300sn.sh b/binutils-2.21/ld/emulparams/h8300sn.sh new file mode 100644 index 0000000..16364ef --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300sn.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8300sn +OUTPUT_FORMAT="coff-h8300" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8300 diff --git a/binutils-2.21/ld/emulparams/h8300snelf.sh b/binutils-2.21/ld/emulparams/h8300snelf.sh new file mode 100644 index 0000000..ddeec11 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300snelf.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/h8300elf.sh +ARCH="h8300:h8300sn" diff --git a/binutils-2.21/ld/emulparams/h8300sx.sh b/binutils-2.21/ld/emulparams/h8300sx.sh new file mode 100644 index 0000000..b46b6f9 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300sx.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8300sx +OUTPUT_FORMAT="coff-h8300" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8300 diff --git a/binutils-2.21/ld/emulparams/h8300sxelf.sh b/binutils-2.21/ld/emulparams/h8300sxelf.sh new file mode 100644 index 0000000..c0b715f --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300sxelf.sh @@ -0,0 +1,16 @@ +. ${srcdir}/emulparams/h8300elf.sh +ARCH="h8300:h8300sx" +STACK_ADDR=0x2fefc +TINY_READONLY_SECTION=".tinyrodata : + { + *(.tinyrodata) + } =0" +TINY_DATA_SECTION=".tinydata 0xff8000 : + { + *(.tinydata) + ${RELOCATING+ _tinydata = .; } + }" +TINY_BSS_SECTION=".tinybss : AT (_tinydata) + { + *(.tinybss) + }" diff --git a/binutils-2.21/ld/emulparams/h8300sxn.sh b/binutils-2.21/ld/emulparams/h8300sxn.sh new file mode 100644 index 0000000..7cad974 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300sxn.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8300sxn +OUTPUT_FORMAT="coff-h8300" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8300 diff --git a/binutils-2.21/ld/emulparams/h8300sxnelf.sh b/binutils-2.21/ld/emulparams/h8300sxnelf.sh new file mode 100644 index 0000000..98e9d49 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8300sxnelf.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/h8300elf.sh +ARCH="h8300:h8300sxn" diff --git a/binutils-2.21/ld/emulparams/h8500.sh b/binutils-2.21/ld/emulparams/h8500.sh new file mode 100644 index 0000000..6f4ca80 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8500.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8500 +OUTPUT_FORMAT="coff-h8500" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8500 diff --git a/binutils-2.21/ld/emulparams/h8500b.sh b/binutils-2.21/ld/emulparams/h8500b.sh new file mode 100644 index 0000000..d2d3fee --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8500b.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8500b +OUTPUT_FORMAT="coff-h8500" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8500 diff --git a/binutils-2.21/ld/emulparams/h8500c.sh b/binutils-2.21/ld/emulparams/h8500c.sh new file mode 100644 index 0000000..240a065 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8500c.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8500c +OUTPUT_FORMAT="coff-h8500" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8500 diff --git a/binutils-2.21/ld/emulparams/h8500m.sh b/binutils-2.21/ld/emulparams/h8500m.sh new file mode 100644 index 0000000..cd9f7b6 --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8500m.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8500m +OUTPUT_FORMAT="coff-h8500" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8500 diff --git a/binutils-2.21/ld/emulparams/h8500s.sh b/binutils-2.21/ld/emulparams/h8500s.sh new file mode 100644 index 0000000..b9e294a --- /dev/null +++ b/binutils-2.21/ld/emulparams/h8500s.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8500s +OUTPUT_FORMAT="coff-h8500" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8500 diff --git a/binutils-2.21/ld/emulparams/hp300bsd.sh b/binutils-2.21/ld/emulparams/hp300bsd.sh new file mode 100644 index 0000000..8f5c50b --- /dev/null +++ b/binutils-2.21/ld/emulparams/hp300bsd.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-hp300bsd" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=4096 +ARCH=m68k diff --git a/binutils-2.21/ld/emulparams/hp3hpux.sh b/binutils-2.21/ld/emulparams/hp3hpux.sh new file mode 100644 index 0000000..b7badd8 --- /dev/null +++ b/binutils-2.21/ld/emulparams/hp3hpux.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-hp300hpux" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=4096 +ARCH=m68k +STACKZERO="___stack_zero = 0x2000; __DYNAMIC = 0;" +# This is needed for HPUX 9.0; it is unnecessary but harmless for 8.0. +SHLIB_PATH="___dld_shlib_path = 0;" diff --git a/binutils-2.21/ld/emulparams/hppa64linux.sh b/binutils-2.21/ld/emulparams/hppa64linux.sh new file mode 100644 index 0000000..d86fdf6 --- /dev/null +++ b/binutils-2.21/ld/emulparams/hppa64linux.sh @@ -0,0 +1,52 @@ +SCRIPT_NAME=elf +ELFSIZE=64 +OUTPUT_FORMAT="elf64-hppa-linux" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x10000 +TARGET_PAGE_SIZE=0x10000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=hppa +MACHINE=hppa2.0w +ENTRY="main" +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +# We really want multiple .stub sections, one for each input .text section, +# but for now this is good enough. +OTHER_READONLY_SECTIONS=" + .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }" + +# The PA64 ELF port treats .plt sections differently than most. We also have +# to create a .opd section. What most systems call the .got, we call the .dlt +OTHER_READWRITE_SECTIONS=" + .opd ${RELOCATING-0} : { *(.opd) } + ${RELOCATING+PROVIDE (__gp = .);} + .plt ${RELOCATING-0} : { *(.plt) } + .dlt ${RELOCATING-0} : { *(.dlt) }" + +# The PA64 ELF port has an additional huge bss section. +OTHER_BSS_SECTIONS=".hbss ${RELOCATING-0} : { *(.hbss) }" + +#OTHER_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));' +OTHER_SYMBOLS=' + PROVIDE (__TLS_SIZE = 0); + PROVIDE (__TLS_INIT_SIZE = 0); + PROVIDE (__TLS_INIT_START = 0); + PROVIDE (__TLS_INIT_A = 0); + PROVIDE (__TLS_PREALLOC_DTV_A = 0);' + +# HPs use .dlt where systems use .got. Sigh. +OTHER_GOT_RELOC_SECTIONS=" + .rela.dlt ${RELOCATING-0} : { *(.rela.dlt) } + .rela.opd ${RELOCATING-0} : { *(.rela.opd) }" + +# We're not actually providing a symbol anymore (due to the inability to be +# safe in regards to shared libraries). So we just allocate the hunk of space +# unconditionally, but do not mess around with the symbol table. +DATA_START_SYMBOLS='. += 16;' + +DATA_PLT= +PLT_BEFORE_GOT= + +# .dynamic should be at the start of the .text segment. +TEXT_DYNAMIC= diff --git a/binutils-2.21/ld/emulparams/hppaelf.sh b/binutils-2.21/ld/emulparams/hppaelf.sh new file mode 100644 index 0000000..77dcb39 --- /dev/null +++ b/binutils-2.21/ld/emulparams/hppaelf.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=hppaelf +OUTPUT_FORMAT="elf32-hppa" +TEXT_START_ADDR=0x1000 +TARGET_PAGE_SIZE=0x1000 +ARCH=hppa +NOP=0x08000240 +START="$START$" +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=hppaelf diff --git a/binutils-2.21/ld/emulparams/hppalinux.sh b/binutils-2.21/ld/emulparams/hppalinux.sh new file mode 100644 index 0000000..9fa4615 --- /dev/null +++ b/binutils-2.21/ld/emulparams/hppalinux.sh @@ -0,0 +1,23 @@ +# If you change this file, please also look at files which source this one: +# hppanbsd.sh + +SCRIPT_NAME=elf +ELFSIZE=32 +OUTPUT_FORMAT="elf32-hppa-linux" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x10000 +TARGET_PAGE_SIZE=0x10000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=hppa +MACHINE=hppa1.1 # We use 1.1 specific features. +NOP=0x08000240 +START="_start" +OTHER_READONLY_SECTIONS=" + .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }" +DATA_START_SYMBOLS='PROVIDE ($global$ = .);' +DATA_PLT= +PLT_BEFORE_GOT= +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=hppaelf diff --git a/binutils-2.21/ld/emulparams/hppanbsd.sh b/binutils-2.21/ld/emulparams/hppanbsd.sh new file mode 100644 index 0000000..dcc6a93 --- /dev/null +++ b/binutils-2.21/ld/emulparams/hppanbsd.sh @@ -0,0 +1,6 @@ +# If you change this file, please also look at files which source this one: +# hppaobsd.sh + +. ${srcdir}/emulparams/hppalinux.sh + +OUTPUT_FORMAT="elf32-hppa-netbsd" diff --git a/binutils-2.21/ld/emulparams/hppaobsd.sh b/binutils-2.21/ld/emulparams/hppaobsd.sh new file mode 100644 index 0000000..0d3bf94 --- /dev/null +++ b/binutils-2.21/ld/emulparams/hppaobsd.sh @@ -0,0 +1,6 @@ +. ${srcdir}/emulparams/hppanbsd.sh + +OUTPUT_FORMAT="elf32-hppa" +TEXT_START_ADDR=0x1000 +TARGET_PAGE_SIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" diff --git a/binutils-2.21/ld/emulparams/i386aout.sh b/binutils-2.21/ld/emulparams/i386aout.sh new file mode 100644 index 0000000..d682e7c --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386aout.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-i386" +TARGET_PAGE_SIZE=0x1000 +TEXT_START_ADDR=0 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +ARCH=i386 diff --git a/binutils-2.21/ld/emulparams/i386beos.sh b/binutils-2.21/ld/emulparams/i386beos.sh new file mode 100755 index 0000000..869da5f --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386beos.sh @@ -0,0 +1,5 @@ +ARCH=i386 +SCRIPT_NAME=i386beos +OUTPUT_FORMAT="pei-i386" +RELOCATEABLE_OUTPUT_FORMAT="pe-i386" +TEMPLATE_NAME=beos diff --git a/binutils-2.21/ld/emulparams/i386bsd.sh b/binutils-2.21/ld/emulparams/i386bsd.sh new file mode 100644 index 0000000..23ab852 --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386bsd.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-i386-bsd" +TARGET_PAGE_SIZE=0x1000 +TEXT_START_ADDR=0 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +ARCH=i386 diff --git a/binutils-2.21/ld/emulparams/i386coff.sh b/binutils-2.21/ld/emulparams/i386coff.sh new file mode 100644 index 0000000..3417b7d --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386coff.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=i386coff +OUTPUT_FORMAT="coff-i386" +TEXT_START_ADDR=0x1000000 +TARGET_PAGE_SIZE=0x1000000 +ARCH=i386 diff --git a/binutils-2.21/ld/emulparams/i386go32.sh b/binutils-2.21/ld/emulparams/i386go32.sh new file mode 100644 index 0000000..104209f --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386go32.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=i386go32 +OUTPUT_FORMAT="coff-go32" +TEXT_START_ADDR=0x10a8 +TARGET_PAGE_SIZE=0x1000 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0 ;; +esac +SEGMENT_SIZE=0x200 +ARCH=i386 + diff --git a/binutils-2.21/ld/emulparams/i386linux.sh b/binutils-2.21/ld/emulparams/i386linux.sh new file mode 100644 index 0000000..7b7463a --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386linux.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-i386-linux" +TARGET_PAGE_SIZE=0x1000 +TEXT_START_ADDR=0x1020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0 ;; +esac +ARCH=i386 +TEMPLATE_NAME=linux diff --git a/binutils-2.21/ld/emulparams/i386lynx.sh b/binutils-2.21/ld/emulparams/i386lynx.sh new file mode 100644 index 0000000..93afb3d --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386lynx.sh @@ -0,0 +1,20 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +NO_RELA_RELOCS=yes +ENTRY=_main +TEXT_BASE=0x0 +DYN_TEXT_BASE=0x00400000 +TEXT_START_ADDR="(DEFINED(_DYNAMIC) ? ${DYN_TEXT_BASE} : ${TEXT_BASE})" +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i386 +MACHINE= +NOP=0x9090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\" + +# Leave room of SIZEOF_HEADERS before text. +EMBEDDED= diff --git a/binutils-2.21/ld/emulparams/i386mach.sh b/binutils-2.21/ld/emulparams/i386mach.sh new file mode 100644 index 0000000..dc44602 --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386mach.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-mach3" +TEXT_START_ADDR=0x10020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x10000 ;; +esac +SEGMENT_SIZE=0x1000 +PAD_TEXT=t +ARCH=i386 diff --git a/binutils-2.21/ld/emulparams/i386moss.sh b/binutils-2.21/ld/emulparams/i386moss.sh new file mode 100644 index 0000000..095d85a --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386moss.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x00002000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i386 +MACHINE= +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/binutils-2.21/ld/emulparams/i386msdos.sh b/binutils-2.21/ld/emulparams/i386msdos.sh new file mode 100644 index 0000000..293bf68 --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386msdos.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=i386msdos +OUTPUT_FORMAT="msdos" +TEXT_START_ADDR=0x0 +SEGMENT_SIZE=0x10 +PAD_TEXT=t +ARCH=i386 diff --git a/binutils-2.21/ld/emulparams/i386nbsd.sh b/binutils-2.21/ld/emulparams/i386nbsd.sh new file mode 100644 index 0000000..a9e6a38 --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386nbsd.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=aout +TEXT_START_ADDR=0x1020 +OUTPUT_FORMAT="a.out-i386-netbsd" +TARGET_PAGE_SIZE=0x1000 +ARCH=i386 +EXECUTABLE_SYMBOLS='__DYNAMIC = 0;' diff --git a/binutils-2.21/ld/emulparams/i386nto.sh b/binutils-2.21/ld/emulparams/i386nto.sh new file mode 100644 index 0000000..626f9c1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386nto.sh @@ -0,0 +1,11 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x08048000 +TEXT_START_SYMBOLS='_btext = .;' +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i386 +MACHINE= +NOP=0x9090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/binutils-2.21/ld/emulparams/i386nw.sh b/binutils-2.21/ld/emulparams/i386nw.sh new file mode 100644 index 0000000..e1897be --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386nw.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=nw +OUTPUT_FORMAT="elf32-i386" +TEXT_START_ADDR=0x08000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=i386 +NOP=0x90909090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/binutils-2.21/ld/emulparams/i386pe.sh b/binutils-2.21/ld/emulparams/i386pe.sh new file mode 100644 index 0000000..38191ec --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386pe.sh @@ -0,0 +1,9 @@ +ARCH=i386 +SCRIPT_NAME=pe +OUTPUT_FORMAT="pei-i386" +RELOCATEABLE_OUTPUT_FORMAT="pe-i386" +TEMPLATE_NAME=pe +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 +GENERATE_AUTO_IMPORT_SCRIPT=1 diff --git a/binutils-2.21/ld/emulparams/i386pe_posix.sh b/binutils-2.21/ld/emulparams/i386pe_posix.sh new file mode 100644 index 0000000..cde0349 --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386pe_posix.sh @@ -0,0 +1,10 @@ +ARCH=i386 +SCRIPT_NAME=pe +OUTPUT_FORMAT="pei-i386" +RELOCATEABLE_OUTPUT_FORMAT="pe-i386" +TEMPLATE_NAME=pe +SUBSYSTEM=7 +EXECUTABLE_NAME=a.out +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 +GENERATE_AUTO_IMPORT_SCRIPT=1 diff --git a/binutils-2.21/ld/emulparams/i386pep.sh b/binutils-2.21/ld/emulparams/i386pep.sh new file mode 100644 index 0000000..76a9802 --- /dev/null +++ b/binutils-2.21/ld/emulparams/i386pep.sh @@ -0,0 +1,9 @@ +ARCH="i386:x86-64" +SCRIPT_NAME=pep +OUTPUT_FORMAT="pei-x86-64" +RELOCATEABLE_OUTPUT_FORMAT="pe-x86-64" +TEMPLATE_NAME=pep +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 +GENERATE_AUTO_IMPORT_SCRIPT=1 diff --git a/binutils-2.21/ld/emulparams/lnk960.sh b/binutils-2.21/ld/emulparams/lnk960.sh new file mode 100644 index 0000000..4a650f7 --- /dev/null +++ b/binutils-2.21/ld/emulparams/lnk960.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=i960 +OUTPUT_FORMAT="" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=128 +ARCH=i960 +TEMPLATE_NAME=lnk960 diff --git a/binutils-2.21/ld/emulparams/m32relf.sh b/binutils-2.21/ld/emulparams/m32relf.sh new file mode 100644 index 0000000..947c7a8 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m32relf.sh @@ -0,0 +1,12 @@ +MACHINE= +SCRIPT_NAME=elf +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-m32r" +TEXT_START_ADDR=0x100 +ARCH=m32r +MACHINE= +MAXPAGESIZE=32 +EMBEDDED=yes + +# This sets the stack to the top of simulator memory (8MB). +OTHER_SYMBOLS='PROVIDE (_stack = 0x800000);' diff --git a/binutils-2.21/ld/emulparams/m32relf_linux.sh b/binutils-2.21/ld/emulparams/m32relf_linux.sh new file mode 100644 index 0000000..9a4ee97 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m32relf_linux.sh @@ -0,0 +1,14 @@ +MACHINE= +SCRIPT_NAME=elf +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-m32r-linux" +TEXT_START_ADDR=0x1000 +ARCH=m32r +MACHINE= +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" + +# Hmmm, there's got to be a better way. This sets the stack to the +# top of simulator memory (32MB). +OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x2000000);' +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes diff --git a/binutils-2.21/ld/emulparams/m32rlelf.sh b/binutils-2.21/ld/emulparams/m32rlelf.sh new file mode 100644 index 0000000..2d4488b --- /dev/null +++ b/binutils-2.21/ld/emulparams/m32rlelf.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/m32relf.sh +OUTPUT_FORMAT="elf32-m32rle" diff --git a/binutils-2.21/ld/emulparams/m32rlelf_linux.sh b/binutils-2.21/ld/emulparams/m32rlelf_linux.sh new file mode 100644 index 0000000..6d16a1c --- /dev/null +++ b/binutils-2.21/ld/emulparams/m32rlelf_linux.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/m32relf_linux.sh +OUTPUT_FORMAT="elf32-m32rle-linux" diff --git a/binutils-2.21/ld/emulparams/m68hc11elf.sh b/binutils-2.21/ld/emulparams/m68hc11elf.sh new file mode 100644 index 0000000..1caa6e1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68hc11elf.sh @@ -0,0 +1,18 @@ +MACHINE= +SCRIPT_NAME=elfm68hc11 +OUTPUT_FORMAT="elf32-m68hc11" +ROM_START_ADDR=0x08000 +ROM_SIZE=0x8000 +RAM_START_ADDR=0x01100 +RAM_SIZE=0x6F00 +EEPROM_START_ADDR=0xb600 +EEPROM_SIZE=512 +TEXT_MEMORY=text +DATA_MEMORY=data +EEPROM_MEMORY=eeprom +ARCH=m68hc11 +MAXPAGESIZE=32 +EMBEDDED=yes +GENERIC_BOARD=no +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=m68hc1xelf diff --git a/binutils-2.21/ld/emulparams/m68hc11elfb.sh b/binutils-2.21/ld/emulparams/m68hc11elfb.sh new file mode 100644 index 0000000..a8f01d2 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68hc11elfb.sh @@ -0,0 +1,12 @@ +MACHINE= +SCRIPT_NAME=elfm68hc11 +OUTPUT_FORMAT="elf32-m68hc11" +TEXT_MEMORY=text +DATA_MEMORY=data +EEPROM_MEMORY=eeprom +ARCH=m68hc11 +MAXPAGESIZE=32 +GENERIC_BOARD=yes +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=m68hc1xelf + diff --git a/binutils-2.21/ld/emulparams/m68hc12elf.sh b/binutils-2.21/ld/emulparams/m68hc12elf.sh new file mode 100644 index 0000000..c4d7487 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68hc12elf.sh @@ -0,0 +1,18 @@ +MACHINE= +SCRIPT_NAME=elfm68hc12 +OUTPUT_FORMAT="elf32-m68hc12" +ROM_START_ADDR=0x08000 +ROM_SIZE=0x8000 +RAM_START_ADDR=0x01100 +RAM_SIZE=0x6F00 +EEPROM_START_ADDR=0x0800 +EEPROM_SIZE=2048 +TEXT_MEMORY=text +DATA_MEMORY=data +EEPROM_MEMORY=eeprom +ARCH=m68hc12 +MAXPAGESIZE=32 +EMBEDDED=yes +GENERIC_BOARD=no +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=m68hc1xelf diff --git a/binutils-2.21/ld/emulparams/m68hc12elfb.sh b/binutils-2.21/ld/emulparams/m68hc12elfb.sh new file mode 100644 index 0000000..acc3ce3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68hc12elfb.sh @@ -0,0 +1,12 @@ +MACHINE= +SCRIPT_NAME=elfm68hc12 +OUTPUT_FORMAT="elf32-m68hc12" +TEXT_MEMORY=text +DATA_MEMORY=data +EEPROM_MEMORY=eeprom +ARCH=m68hc12 +MAXPAGESIZE=32 +GENERIC_BOARD=yes +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=m68hc1xelf + diff --git a/binutils-2.21/ld/emulparams/m68k4knbsd.sh b/binutils-2.21/ld/emulparams/m68k4knbsd.sh new file mode 100644 index 0000000..d160264 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68k4knbsd.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=aout +TEXT_START_ADDR=0x1020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +OUTPUT_FORMAT="a.out-m68k4k-netbsd" +TARGET_PAGE_SIZE=0x1000 +ARCH=m68k +EXECUTABLE_SYMBOLS='__DYNAMIC = 0;' diff --git a/binutils-2.21/ld/emulparams/m68kaout.sh b/binutils-2.21/ld/emulparams/m68kaout.sh new file mode 100644 index 0000000..09e6c72 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68kaout.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-zero-big" +TEXT_START_ADDR=0x2020 +TARGET_PAGE_SIZE=0x2000 +SEGMENT_SIZE=0x20000 +ARCH=m68k diff --git a/binutils-2.21/ld/emulparams/m68kaux.sh b/binutils-2.21/ld/emulparams/m68kaux.sh new file mode 100644 index 0000000..19e86cc --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68kaux.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=m68kaux +OUTPUT_FORMAT="coff-m68k-aux" +SEGMENT_SIZE=0x40000 +TARGET_PAGE_SIZE=0x1000 +TEXT_START_ADDR="$SEGMENT_SIZE + SIZEOF_HEADERS" +NON_PAGED_TEXT_START_ADDR=SIZEOF_HEADERS +DATA_ALIGNMENT_="(. & (-$SEGMENT_SIZE | $TARGET_PAGE_SIZE-1)) + $SEGMENT_SIZE" +ARCH=m68k diff --git a/binutils-2.21/ld/emulparams/m68kcoff.sh b/binutils-2.21/ld/emulparams/m68kcoff.sh new file mode 100644 index 0000000..bd884c9 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68kcoff.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=m68kcoff +OUTPUT_FORMAT="coff-m68k" +TEXT_START_ADDR=0x1000000 +TARGET_PAGE_SIZE=0x1000000 +ARCH=m68k +TEMPLATE_NAME=m68kcoff diff --git a/binutils-2.21/ld/emulparams/m68kelf.sh b/binutils-2.21/ld/emulparams/m68kelf.sh new file mode 100644 index 0000000..5c5e672 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68kelf.sh @@ -0,0 +1,14 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-m68k" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x80000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH=m68k +MACHINE= +NOP=0x4e714e71 +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=m68kelf +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes +NO_SMALL_DATA=yes diff --git a/binutils-2.21/ld/emulparams/m68kelfnbsd.sh b/binutils-2.21/ld/emulparams/m68kelfnbsd.sh new file mode 100644 index 0000000..69e328d --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68kelfnbsd.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/m68kelf.sh +TEXT_START_ADDR=0x2000 +TARGET_PAGE_SIZE=0x2000 +MACHINE= diff --git a/binutils-2.21/ld/emulparams/m68klinux.sh b/binutils-2.21/ld/emulparams/m68klinux.sh new file mode 100644 index 0000000..924fdbe --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68klinux.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-m68k-linux" +TARGET_PAGE_SIZE=0x1000 +TEXT_START_ADDR=0x1020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0 ;; +esac +ARCH=m68k +TEMPLATE_NAME=linux diff --git a/binutils-2.21/ld/emulparams/m68knbsd.sh b/binutils-2.21/ld/emulparams/m68knbsd.sh new file mode 100644 index 0000000..fcda407 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68knbsd.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=aout +TEXT_START_ADDR=0x2020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x2000 ;; +esac +OUTPUT_FORMAT="a.out-m68k-netbsd" +TARGET_PAGE_SIZE=0x2000 +ARCH=m68k +EXECUTABLE_SYMBOLS='__DYNAMIC = 0;' diff --git a/binutils-2.21/ld/emulparams/m68kpsos.sh b/binutils-2.21/ld/emulparams/m68kpsos.sh new file mode 100644 index 0000000..22d1598 --- /dev/null +++ b/binutils-2.21/ld/emulparams/m68kpsos.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=psos +OUTPUT_FORMAT="elf32-m68k" +TEXT_START_ADDR=0x20000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=m68k +TEMPLATE_NAME=elf32 diff --git a/binutils-2.21/ld/emulparams/m88kbcs.sh b/binutils-2.21/ld/emulparams/m88kbcs.sh new file mode 100644 index 0000000..d48a1eb --- /dev/null +++ b/binutils-2.21/ld/emulparams/m88kbcs.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=m88kbcs +OUTPUT_FORMAT="coff-m88kbcs" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=128 +ARCH=m88k diff --git a/binutils-2.21/ld/emulparams/mcorepe.sh b/binutils-2.21/ld/emulparams/mcorepe.sh new file mode 100644 index 0000000..95d84e7 --- /dev/null +++ b/binutils-2.21/ld/emulparams/mcorepe.sh @@ -0,0 +1,9 @@ +ARCH=mcore +SCRIPT_NAME=mcorepe +OUTPUT_FORMAT="pei-mcore-little" +LITTLE_OUTPUT_FORMAT="pei-mcore-little" +BIG_OUTPUT_FORMAT="pei-mcore-big" +TEMPLATE_NAME=pe +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 diff --git a/binutils-2.21/ld/emulparams/mipsbig.sh b/binutils-2.21/ld/emulparams/mipsbig.sh new file mode 100644 index 0000000..9fe2953 --- /dev/null +++ b/binutils-2.21/ld/emulparams/mipsbig.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=mips +OUTPUT_FORMAT="ecoff-bigmips" +BIG_OUTPUT_FORMAT="ecoff-bigmips" +LITTLE_OUTPUT_FORMAT="ecoff-littlemips" +TARGET_PAGE_SIZE=0x1000000 +ARCH=mips diff --git a/binutils-2.21/ld/emulparams/mipsbsd.sh b/binutils-2.21/ld/emulparams/mipsbsd.sh new file mode 100644 index 0000000..e8fb35b --- /dev/null +++ b/binutils-2.21/ld/emulparams/mipsbsd.sh @@ -0,0 +1,7 @@ +SCRIPT_NAME=mipsbsd +OUTPUT_FORMAT="a.out-mips-little" +BIG_OUTPUT_FORMAT="a.out-mips-big" +LITTLE_OUTPUT_FORMAT="a.out-mips-little" +TEXT_START_ADDR=0x1020 +TARGET_PAGE_SIZE=4096 +ARCH=mips diff --git a/binutils-2.21/ld/emulparams/mipsidt.sh b/binutils-2.21/ld/emulparams/mipsidt.sh new file mode 100644 index 0000000..f381267 --- /dev/null +++ b/binutils-2.21/ld/emulparams/mipsidt.sh @@ -0,0 +1,12 @@ +SCRIPT_NAME=mips +OUTPUT_FORMAT="ecoff-bigmips" +BIG_OUTPUT_FORMAT="ecoff-bigmips" +LITTLE_OUTPUT_FORMAT="ecoff-littlemips" +TARGET_PAGE_SIZE=0x1000000 +ARCH=mips +ENTRY=start +TEXT_START_ADDR=0xa0012000 +DATA_ADDR=. +TEMPLATE_NAME=generic +EXTRA_EM_FILE=mipsecoff +EMBEDDED=yes diff --git a/binutils-2.21/ld/emulparams/mipsidtl.sh b/binutils-2.21/ld/emulparams/mipsidtl.sh new file mode 100644 index 0000000..52447ff --- /dev/null +++ b/binutils-2.21/ld/emulparams/mipsidtl.sh @@ -0,0 +1,12 @@ +SCRIPT_NAME=mips +OUTPUT_FORMAT="ecoff-littlemips" +BIG_OUTPUT_FORMAT="ecoff-bigmips" +LITTLE_OUTPUT_FORMAT="ecoff-littlemips" +TARGET_PAGE_SIZE=0x1000000 +ARCH=mips +ENTRY=start +TEXT_START_ADDR=0xa0012000 +DATA_ADDR=. +TEMPLATE_NAME=generic +EXTRA_EM_FILE=mipsecoff +EMBEDDED=yes diff --git a/binutils-2.21/ld/emulparams/mipslit.sh b/binutils-2.21/ld/emulparams/mipslit.sh new file mode 100644 index 0000000..acb2344 --- /dev/null +++ b/binutils-2.21/ld/emulparams/mipslit.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=mips +OUTPUT_FORMAT="ecoff-littlemips" +BIG_OUTPUT_FORMAT="ecoff-bigmips" +LITTLE_OUTPUT_FORMAT="ecoff-littlemips" +TARGET_PAGE_SIZE=0x1000000 +ARCH=mips diff --git a/binutils-2.21/ld/emulparams/mipslnews.sh b/binutils-2.21/ld/emulparams/mipslnews.sh new file mode 100644 index 0000000..d0bb91c --- /dev/null +++ b/binutils-2.21/ld/emulparams/mipslnews.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=mips +OUTPUT_FORMAT="ecoff-littlemips" +BIG_OUTPUT_FORMAT="ecoff-bigmips" +LITTLE_OUTPUT_FORMAT="ecoff-littlemips" +TARGET_PAGE_SIZE=0x1000000 +ARCH=mips +TEXT_START_ADDR=0x80080000 +DATA_ADDR=. +EMBEDDED=yes diff --git a/binutils-2.21/ld/emulparams/mipspe.sh b/binutils-2.21/ld/emulparams/mipspe.sh new file mode 100644 index 0000000..95c4adb --- /dev/null +++ b/binutils-2.21/ld/emulparams/mipspe.sh @@ -0,0 +1,9 @@ +ARCH=mips +SCRIPT_NAME=pe +OUTPUT_FORMAT="pei-mips" +OUTPUT_ARCH="mips" +RELOCATEABLE_OUTPUT_FORMAT="ecoff-littlemips" +TEMPLATE_NAME=pe +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 diff --git a/binutils-2.21/ld/emulparams/mmo.sh b/binutils-2.21/ld/emulparams/mmo.sh new file mode 100644 index 0000000..ca98013 --- /dev/null +++ b/binutils-2.21/ld/emulparams/mmo.sh @@ -0,0 +1,11 @@ +SCRIPT_NAME=mmo +TARGET_PAGE_SIZE=256 + +# Default to 0 as mmixal does. +TEXT_START_ADDR='DEFINED (__.MMIX.start..text) ? __.MMIX.start..text : 0' +DATA_ADDR='DEFINED (__.MMIX.start..data) ? __.MMIX.start..data : 0x2000000000000000' +OUTPUT_FORMAT=mmo +RELOCATEABLE_OUTPUT_FORMAT=elf64-mmix +ARCH=mmix +COMPILE_IN=yes +EXTRA_EM_FILE=mmo diff --git a/binutils-2.21/ld/emulparams/mn10200.sh b/binutils-2.21/ld/emulparams/mn10200.sh new file mode 100644 index 0000000..9cec0b5 --- /dev/null +++ b/binutils-2.21/ld/emulparams/mn10200.sh @@ -0,0 +1,24 @@ +# If you change this file, please also look at files which source this one: +# mn10300.sh + +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-mn10200" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x0 +ARCH=mn10200 +MACHINE= +MAXPAGESIZE=1 +ENTRY=_start +EMBEDDED=yes + +# This sets the stack to the top of the simulator memory (2^19 bytes). +STACK_ADDR=0x80000 + +# These are for compatibility with the COFF toolchain. +# XXX These should definitely disappear. +CTOR_START='___ctors = .;' +CTOR_END='___ctors_end = .;' +DTOR_START='___dtors = .;' +DTOR_END='___dtors_end = .;' diff --git a/binutils-2.21/ld/emulparams/mn10300.sh b/binutils-2.21/ld/emulparams/mn10300.sh new file mode 100644 index 0000000..121987c --- /dev/null +++ b/binutils-2.21/ld/emulparams/mn10300.sh @@ -0,0 +1,6 @@ +. ${srcdir}/emulparams/mn10200.sh +OUTPUT_FORMAT="elf32-mn10300" +ARCH=mn10300 +TEMPLATE_NAME=elf32 +unset EXTRA_EM_FILE +GENERATE_SHLIB_SCRIPT=yes diff --git a/binutils-2.21/ld/emulparams/msp430all.sh b/binutils-2.21/ld/emulparams/msp430all.sh new file mode 100644 index 0000000..57d21c2 --- /dev/null +++ b/binutils-2.21/ld/emulparams/msp430all.sh @@ -0,0 +1,553 @@ +#!/bin/sh + +# This called by genscripts_extra.sh + +MSP430_NAME=${EMULATION_NAME} + +SCRIPT_NAME=elf32msp430 +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-msp430" +MACHINE= +MAXPAGESIZE=1 +EMBEDDED=yes + +if [ "${MSP430_NAME}" = "msp430x110" ] ; then +ARCH=msp:11 +ROM_START=0xfc00 +ROM_SIZE=0x3e0 +RAM_START=0x0200 +RAM_SIZE=128 +STACK=0x280 +fi + +if [ "${MSP430_NAME}" = "msp430x1101" ] ; then +ARCH=msp:110 +ROM_START=0xfc00 +ROM_SIZE=0x3e0 +RAM_START=0x0200 +RAM_SIZE=128 +STACK=0x280 +fi + +if [ "${MSP430_NAME}" = "msp430x1111" ] ; then +ARCH=msp:110 +ROM_START=0xf800 +ROM_SIZE=0x07e0 +RAM_START=0x0200 +RAM_SIZE=128 +STACK=0x280 +fi + +if [ "${MSP430_NAME}" = "msp430x112" ] ; then +ARCH=msp:11 +ROM_START=0xf000 +ROM_SIZE=0xfe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x1121" ] ; then +ARCH=msp:110 +ROM_START=0xf000 +ROM_SIZE=0x0fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x1122" ] ; then +ARCH=msp:110 +ROM_START=0xf000 +ROM_SIZE=0x0fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x1132" ] ; then +ARCH=msp:110 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x122" ] ; then +ARCH=msp:12 +ROM_START=0xf000 +ROM_SIZE=0xfe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x1222" ] ; then +ARCH=msp:12 +ROM_START=0xf000 +ROM_SIZE=0xfe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x123" ] ; then +ARCH=msp:12 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x1232" ] ; then +ARCH=msp:12 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x133" ] ; then +ARCH=msp:13 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x1331" ] ; then +ARCH=msp:13 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x135" ] ; then +ARCH=msp:13 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x1351" ] ; then +ARCH=msp:13 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x147" ] ; then +ARCH=msp:14 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1K +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x148" ] ; then +ARCH=msp:14 +ROM_START=0x4000 +ROM_SIZE=0xbfe0 +RAM_START=0x0200 +RAM_SIZE=0x0800 +STACK=0xa00 +fi + +if [ "${MSP430_NAME}" = "msp430x149" ] ; then +ARCH=msp:14 +ROM_START=0x1100 +ROM_SIZE=0xeee0 +RAM_START=0x0200 +RAM_SIZE=0x0800 +STACK=0xa00 +fi + +if [ "${MSP430_NAME}" = "msp430x155" ] ; then +ARCH=msp:15 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x156" ] ; then +ARCH=msp:15 +ROM_START=0xa000 +ROM_SIZE=0x5fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x157" ] ; then +ARCH=msp:15 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1K +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x167" ] ; then +ARCH=msp:16 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1K +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x168" ] ; then +ARCH=msp:16 +ROM_START=0x4000 +ROM_SIZE=0xbfe0 +RAM_START=0x0200 +RAM_SIZE=0x0800 +STACK=0xa00 +fi + +if [ "${MSP430_NAME}" = "msp430x169" ] ; then +ARCH=msp:16 +ROM_START=0x1100 +ROM_SIZE=0xeee0 +RAM_START=0x0200 +RAM_SIZE=0x0800 +STACK=0xa00 +fi + +if [ "${MSP430_NAME}" = "msp430x1610" ] ; then +ARCH=msp:16 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x1100 +RAM_SIZE=0x1400 +STACK=0x2500 +fi + +if [ "${MSP430_NAME}" = "msp430x1611" ] ; then +ARCH=msp:16 +ROM_START=0x4000 +ROM_SIZE=0xbfe0 +RAM_START=0x1100 +RAM_SIZE=0x2800 +STACK=0x3900 +fi + +if [ "${MSP430_NAME}" = "msp430x1612" ] ; then +ARCH=msp:16 +ROM_START=0x2500 +ROM_SIZE=0xdae0 +RAM_START=0x1100 +RAM_SIZE=0x1400 +STACK=0x2500 +fi + +if [ "${MSP430_NAME}" = "msp430x2101" ] ; then +ARCH=msp:21 +ROM_START=0xFC00 +ROM_SIZE=0x03e0 +RAM_START=0x0200 +RAM_SIZE=128 +STACK=0x280 +fi + +if [ "${MSP430_NAME}" = "msp430x2111" ] ; then +ARCH=msp:21 +ROM_START=0xF800 +ROM_SIZE=0x07e0 +RAM_START=0x0200 +RAM_SIZE=128 +STACK=0x280 +fi + +if [ "${MSP430_NAME}" = "msp430x2121" ] ; then +ARCH=msp:21 +ROM_START=0xf000 +ROM_SIZE=0x0fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x2131" ] ; then +ARCH=msp:21 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x311" ] ; then +ARCH=msp:31 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0xf800 +ROM_SIZE=0x07e0 +RAM_START=0x0200 +RAM_SIZE=128 +STACK=0x280 +fi + +if [ "${MSP430_NAME}" = "msp430x312" ] ; then +ARCH=msp:31 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0xf000 +ROM_SIZE=0x0fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x313" ] ; then +ARCH=msp:31 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x314" ] ; then +ARCH=msp:31 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0xd000 +ROM_SIZE=0x2fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x315" ] ; then +ARCH=msp:31 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x323" ] ; then +ARCH=msp:32 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x325" ] ; then +ARCH=msp:32 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x336" ] ; then +ARCH=msp:33 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0xa000 +ROM_SIZE=0x5fe0 +RAM_START=0x0200 +RAM_SIZE=1024 +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x337" ] ; then +ARCH=msp:33 +SCRIPT_NAME=elf32msp430_3 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1024 +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x412" ] ; then +ARCH=msp:41 +ROM_START=0xf000 +ROM_SIZE=0x0fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x413" ] ; then +ARCH=msp:41 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x415" ] ; then +ARCH=msp:41 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x417" ] ; then +ARCH=msp:41 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1024 +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x435" ] ; then +ARCH=msp:43 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430x436" ] ; then +ARCH=msp:43 +ROM_START=0xa000 +ROM_SIZE=0x5fe0 +RAM_START=0x0200 +RAM_SIZE=1024 +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x437" ] ; then +ARCH=msp:43 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1024 +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x447" ] ; then +ARCH=msp:44 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1024 +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430x448" ] ; then +ARCH=msp:44 +ROM_START=0x4000 +ROM_SIZE=0xbfe0 +RAM_START=0x0200 +RAM_SIZE=0x0800 +STACK=0xa00 +fi + +if [ "${MSP430_NAME}" = "msp430x449" ] ; then +ARCH=msp:44 +ROM_START=0x1100 +ROM_SIZE=0xeee0 +RAM_START=0x0200 +RAM_SIZE=0x0800 +STACK=0xa00 +fi + +if [ "${MSP430_NAME}" = "msp430xE423" ] ; then +ARCH=msp:42 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430xE425" ] ; then +ARCH=msp:42 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430xE427" ] ; then +ARCH=msp:42 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1024 +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430xG437" ] ; then +ARCH=msp:43 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=1024 +STACK=0x600 +fi + +if [ "${MSP430_NAME}" = "msp430xG438" ] ; then +ARCH=msp:43 +ROM_START=0x4000 +ROM_SIZE=0xbef0 +RAM_START=0x0200 +RAM_SIZE=0x0800 +STACK=0xa00 +fi + +if [ "${MSP430_NAME}" = "msp430xG439" ] ; then +ARCH=msp:43 +ROM_START=0x1100 +ROM_SIZE=0xeee0 +RAM_START=0x0200 +RAM_SIZE=0x0800 +STACK=0xa00 +fi + +if [ "${MSP430_NAME}" = "msp430xW423" ] ; then +ARCH=msp:42 +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430xW425" ] ; then +ARCH=msp:42 +ROM_START=0xc000 +ROM_SIZE=0x3fe0 +RAM_START=0x0200 +RAM_SIZE=512 +STACK=0x400 +fi + +if [ "${MSP430_NAME}" = "msp430xW427" ] ; then +ARCH=msp:42 +ROM_START=0x8000 +ROM_SIZE=0x7fe0 +RAM_START=0x0200 +RAM_SIZE=0x400 +STACK=0x600 +fi diff --git a/binutils-2.21/ld/emulparams/news.sh b/binutils-2.21/ld/emulparams/news.sh new file mode 100644 index 0000000..310ddf9 --- /dev/null +++ b/binutils-2.21/ld/emulparams/news.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-newsos3" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=0x1000 +ARCH=m68k diff --git a/binutils-2.21/ld/emulparams/ns32knbsd.sh b/binutils-2.21/ld/emulparams/ns32knbsd.sh new file mode 100644 index 0000000..12e4b09 --- /dev/null +++ b/binutils-2.21/ld/emulparams/ns32knbsd.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=aout +TEXT_START_ADDR=0x1020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +OUTPUT_FORMAT="a.out-ns32k-netbsd" +TARGET_PAGE_SIZE=0x1000 +ARCH=ns32k +EXECUTABLE_SYMBOLS='__DYNAMIC = 0;' +EXTRA_EM_FILE=netbsd diff --git a/binutils-2.21/ld/emulparams/or32.sh b/binutils-2.21/ld/emulparams/or32.sh new file mode 100644 index 0000000..0e22e45 --- /dev/null +++ b/binutils-2.21/ld/emulparams/or32.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=or32 +OUTPUT_FORMAT="coff-or32-big" +TEXT_START_ADDR=0x1000000 +TARGET_PAGE_SIZE=0x1000000 +ARCH=or32 diff --git a/binutils-2.21/ld/emulparams/or32elf.sh b/binutils-2.21/ld/emulparams/or32elf.sh new file mode 100644 index 0000000..5d85b04 --- /dev/null +++ b/binutils-2.21/ld/emulparams/or32elf.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-or32" +NO_RELA_RELOCS=yes +TEXT_START_ADDR=0x1000000 +TARGET_PAGE_SIZE=0x1000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=or32 diff --git a/binutils-2.21/ld/emulparams/pc532macha.sh b/binutils-2.21/ld/emulparams/pc532macha.sh new file mode 100644 index 0000000..2b70618 --- /dev/null +++ b/binutils-2.21/ld/emulparams/pc532macha.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-pc532-mach" +TARGET_PAGE_SIZE=0x1000 +TEXT_START_ADDR="0x10020" +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x10000 ;; +esac +ARCH=ns32k diff --git a/binutils-2.21/ld/emulparams/pdp11.sh b/binutils-2.21/ld/emulparams/pdp11.sh new file mode 100644 index 0000000..aaf955a --- /dev/null +++ b/binutils-2.21/ld/emulparams/pdp11.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-pdp11" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=256 +ARCH=pdp11 diff --git a/binutils-2.21/ld/emulparams/pjelf.sh b/binutils-2.21/ld/emulparams/pjelf.sh new file mode 100644 index 0000000..37f0034 --- /dev/null +++ b/binutils-2.21/ld/emulparams/pjelf.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-pj" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x1000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=pj diff --git a/binutils-2.21/ld/emulparams/pjlelf.sh b/binutils-2.21/ld/emulparams/pjlelf.sh new file mode 100644 index 0000000..88c2b64 --- /dev/null +++ b/binutils-2.21/ld/emulparams/pjlelf.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/pjelf.sh +OUTPUT_FORMAT="elf32-pjl" diff --git a/binutils-2.21/ld/emulparams/ppclynx.sh b/binutils-2.21/ld/emulparams/ppclynx.sh new file mode 100644 index 0000000..76aefd6 --- /dev/null +++ b/binutils-2.21/ld/emulparams/ppclynx.sh @@ -0,0 +1,23 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-powerpc" +NO_REL_RELOCS=yes +TEXT_BASE=0x00002000 +DYN_TEXT_BASE=0x00400000 +TEXT_START_ADDR="(DEFINED(_DYNAMIC) ? ${DYN_TEXT_BASE} : ${TEXT_BASE})" +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x1000 ;; +esac +ARCH=powerpc +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\" + +# Leave room of SIZEOF_HEADERS before text. +EMBEDDED= +# PLT on PowerPC is generated at run-time. +BSS_PLT= +OTHER_READWRITE_SECTIONS=" + .got1 ${RELOCATING-0} : { *(.got1) } + .got2 ${RELOCATING-0} : { *(.got2) }" diff --git a/binutils-2.21/ld/emulparams/ppcmacos.sh b/binutils-2.21/ld/emulparams/ppcmacos.sh new file mode 100644 index 0000000..9f02af4 --- /dev/null +++ b/binutils-2.21/ld/emulparams/ppcmacos.sh @@ -0,0 +1,6 @@ +TEMPLATE_NAME=aix +SCRIPT_NAME=aix +OUTPUT_FORMAT="xcoff-powermac" +OUTPUT_FORMAT_32BIT="xcoff-powermac" +OUTPUT_FORMAT_64BIT="xcoff-powermac" +ARCH=powerpc diff --git a/binutils-2.21/ld/emulparams/ppcnw.sh b/binutils-2.21/ld/emulparams/ppcnw.sh new file mode 100644 index 0000000..e7d197d --- /dev/null +++ b/binutils-2.21/ld/emulparams/ppcnw.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=nw +OUTPUT_FORMAT="elf32-powerpc" +TEXT_START_ADDR=0x0400000 +DATA_ADDR=0x10000000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=powerpc diff --git a/binutils-2.21/ld/emulparams/ppcpe.sh b/binutils-2.21/ld/emulparams/ppcpe.sh new file mode 100644 index 0000000..ed7df88 --- /dev/null +++ b/binutils-2.21/ld/emulparams/ppcpe.sh @@ -0,0 +1,7 @@ +ARCH=powerpc +SCRIPT_NAME=ppcpe +OUTPUT_FORMAT="pei-powerpcle" +TEMPLATE_NAME=pe +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 diff --git a/binutils-2.21/ld/emulparams/riscix.sh b/binutils-2.21/ld/emulparams/riscix.sh new file mode 100644 index 0000000..e7f6d92 --- /dev/null +++ b/binutils-2.21/ld/emulparams/riscix.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=riscix +OUTPUT_FORMAT="a.out-riscix" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=0x8000 +ARCH=arm diff --git a/binutils-2.21/ld/emulparams/scoreelf.sh b/binutils-2.21/ld/emulparams/scoreelf.sh new file mode 100644 index 0000000..3a7ed31 --- /dev/null +++ b/binutils-2.21/ld/emulparams/scoreelf.sh @@ -0,0 +1,41 @@ +MACHINE= +SCRIPT_NAME=elf +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=scoreelf +OUTPUT_FORMAT="elf32-bigscore" +BIG_OUTPUT_FORMAT="elf32-bigscore" +LITTLE_OUTPUT_FORMAT="elf32-littlescore" +NO_RELA_RELOCS=yes +GROUP="-lm -lc -lglsim -lgcc -lstdc++" + +TEXT_START_ADDR=0x00000000 +MAXPAGESIZE=256 +NONPAGED_TEXT_START_ADDR=0x0400000 +SHLIB_TEXT_START_ADDR=0x5ffe0000 +OTHER_GOT_SYMBOLS=' + _gp = ALIGN(16) + 0x3ff0; +' + +OTHER_BSS_START_SYMBOLS='_bss_start__ = . + ALIGN(4);' +OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;' +DATA_START_SYMBOLS='_fdata = . ;' +SDATA_START_SYMBOLS='_sdata_begin = . ;' +OTHER_BSS_SYMBOLS=' + _bss_start = ALIGN(4) ; +' +# This sets the stack to the top of the simulator memory (2^19 bytes). +STACK_ADDR=0x8000000 + +SCORE_NAME=${EMULATION_NAME} +if [ "${SCORE_NAME}" = "score3_elf" ] ; then +ARCH=score3 +fi + +if [ "${SCORE_NAME}" = "score7_elf" ] ; then +ARCH=score7 +fi + +MACHINE= +ENTRY=_start +EMBEDDED=yes +GENERATE_SHLIB_SCRIPT=yes diff --git a/binutils-2.21/ld/emulparams/sh.sh b/binutils-2.21/ld/emulparams/sh.sh new file mode 100644 index 0000000..52d1443 --- /dev/null +++ b/binutils-2.21/ld/emulparams/sh.sh @@ -0,0 +1,8 @@ +# If you change this file, please also look at files which source this one: +# shl.sh + +SCRIPT_NAME=sh +OUTPUT_FORMAT="coff-sh" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=sh diff --git a/binutils-2.21/ld/emulparams/shelf.sh b/binutils-2.21/ld/emulparams/shelf.sh new file mode 100644 index 0000000..5757b81 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf.sh @@ -0,0 +1,34 @@ +# If you change this file, please also look at files which source this one: +# shlelf.sh, shelf_nbsd.sh + +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-sh" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x1000 +MAXPAGESIZE=128 +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +EMBEDDED=yes + +# These are for compatibility with the COFF toolchain. +ENTRY=start +CTOR_START='___ctors = .;' +CTOR_END='___ctors_end = .;' +DTOR_START='___dtors = .;' +DTOR_END='___dtors_end = .;' +# This is like setting STACK_ADDR to 0x300000, except that the setting can +# be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra +# sentinal value at the bottom. +# N.B. We can't use PROVIDE to set the default value in a symbol because +# the address is needed to place the .stack section, which in turn is needed +# to hold the sentinel value(s). +test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" .stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : 0x300000)} : + { + ${RELOCATING+_stack = .;} + *(.stack) + LONG(0xdeaddead) + }" +# We do not need .stack for shared library. +test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" diff --git a/binutils-2.21/ld/emulparams/shelf32.sh b/binutils-2.21/ld/emulparams/shelf32.sh new file mode 100644 index 0000000..966bd30 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf32.sh @@ -0,0 +1,59 @@ +# Note: this parameter script is sourced by the other +# sh[l]elf(32|64).sh parameter scripts. +SCRIPT_NAME=elf +OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf32-sh64"} +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x1000 +MAXPAGESIZE=128 +ARCH=sh +MACHINE=sh5 +ALIGNMENT=8 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +EMBEDDED=yes + +DATA_START_SYMBOLS='PROVIDE (___data = .);' + +# If data is located right after .text (not explicitly specified), +# then we need to align it to an 8-byte boundary. +OTHER_READONLY_SECTIONS=' +PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0); +. = ALIGN (8); +' + +# Make _edata and .bss aligned by smuggling in an alignment directive. +OTHER_GOT_SECTIONS='. = ALIGN (8);' + +# These are for compatibility with the COFF toolchain. +ENTRY=start +CTOR_START='___ctors = .;' +CTOR_END='___ctors_end = .;' +DTOR_START='___dtors = .;' +DTOR_END='___dtors_end = .;' + +# Do not use the varname=${varname-'string'} construct here; there are +# problems with that on some shells (e.g. on Solaris) where there is a bug +# that trigs when $varname contains a "}". +# The effect of the .stack definition is like setting STACK_ADDR to 0x80000, +# except that the setting can be overridden, e.g. --defsym _stack=0xff000, +# and that we put an extra sentinal value at the bottom. +# N.B. We can't use PROVIDE to set the default value in a symbol because +# the address is needed to place the .stack section, which in turn is needed +# to hold the sentinel value(s). +test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" + .stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x80000)} : + { + ${RELOCATING+_stack = .;} + *(.stack) + LONG(0xdeaddead) + } + .cranges 0 : { *(.cranges) } +" +# We do not need .stack for shared library. +test -n "$CREATE_SHLIB" && OTHER_SECTIONS=" + .cranges 0 : { *(.cranges) } +" + +# We need to adjust sizes in the .cranges section after relaxation, so +# we need an after_allocation function, and it goes in this file. +EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf} diff --git a/binutils-2.21/ld/emulparams/shelf32_linux.sh b/binutils-2.21/ld/emulparams/shelf32_linux.sh new file mode 100644 index 0000000..a51e22f --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf32_linux.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/shlelf32_linux.sh +OUTPUT_FORMAT="elf32-sh64big-linux" diff --git a/binutils-2.21/ld/emulparams/shelf32_nbsd.sh b/binutils-2.21/ld/emulparams/shelf32_nbsd.sh new file mode 100644 index 0000000..63aee8f --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf32_nbsd.sh @@ -0,0 +1,17 @@ +# If you change this file, please alsolook at files which source this one: +# shlelf32_nbsd.sh + +. ${srcdir}/emulparams/shelf32.sh + +OUTPUT_FORMAT="elf32-sh64-nbsd" +TEXT_START_ADDR=0x400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" + +ENTRY=__start + +unset EMBEDDED +unset STACK_ADDR +unset OTHER_SECTIONS +OTHER_SECTIONS=" + .cranges 0 : { *(.cranges) } +" diff --git a/binutils-2.21/ld/emulparams/shelf64.sh b/binutils-2.21/ld/emulparams/shelf64.sh new file mode 100644 index 0000000..5037f35 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf64.sh @@ -0,0 +1,18 @@ +# Note: this is sourced in turn by shlelf64.sh +OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf64-sh64"} +ELFSIZE=64 + +EXTRA_EM_FILE= +. ${srcdir}/emulparams/shelf32.sh + +# We do not need .cranges +test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" + .stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x80000)} : + { + ${RELOCATING+_stack = .;} + *(.stack) + LONG(0xdeaddead) + } +" +# We do not need .stack for shared library. +test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" diff --git a/binutils-2.21/ld/emulparams/shelf64_nbsd.sh b/binutils-2.21/ld/emulparams/shelf64_nbsd.sh new file mode 100644 index 0000000..7a3ff21 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf64_nbsd.sh @@ -0,0 +1,8 @@ +. ${srcdir}/emulparams/shelf32_nbsd.sh + +OUTPUT_FORMAT="elf64-sh64-nbsd" +ELFSIZE=64 + +# We do not need .cranges +OTHER_SECTIONS='' +EXTRA_EM_FILE= diff --git a/binutils-2.21/ld/emulparams/shelf_fd.sh b/binutils-2.21/ld/emulparams/shelf_fd.sh new file mode 100644 index 0000000..7ec25ab --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf_fd.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/shlelf_fd.sh +OUTPUT_FORMAT="elf32-shbig-fdpic" diff --git a/binutils-2.21/ld/emulparams/shelf_linux.sh b/binutils-2.21/ld/emulparams/shelf_linux.sh new file mode 100644 index 0000000..b841bef --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf_linux.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/shlelf_linux.sh +OUTPUT_FORMAT="elf32-shbig-linux" diff --git a/binutils-2.21/ld/emulparams/shelf_nbsd.sh b/binutils-2.21/ld/emulparams/shelf_nbsd.sh new file mode 100644 index 0000000..9d331c6 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf_nbsd.sh @@ -0,0 +1,15 @@ +# If you change this file, please alsolook at files which source this one: +# shlelf_nbsd.sh + +. ${srcdir}/emulparams/shelf.sh + +OUTPUT_FORMAT="elf32-sh-nbsd" +TEXT_START_ADDR=0x400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" + +DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; + +ENTRY=_start + +unset EMBEDDED +unset OTHER_SECTIONS diff --git a/binutils-2.21/ld/emulparams/shelf_nto.sh b/binutils-2.21/ld/emulparams/shelf_nto.sh new file mode 100644 index 0000000..c4d71aa --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf_nto.sh @@ -0,0 +1,11 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-sh" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x08040000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +TEXT_START_SYMBOLS='_btext = .;' +ENTRY=_start diff --git a/binutils-2.21/ld/emulparams/shelf_uclinux.sh b/binutils-2.21/ld/emulparams/shelf_uclinux.sh new file mode 100644 index 0000000..2af5da4 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf_uclinux.sh @@ -0,0 +1,4 @@ +. ${srcdir}/emulparams/shelf.sh + +# We do not want a .stack section +OTHER_SECTIONS="" diff --git a/binutils-2.21/ld/emulparams/shelf_vxworks.sh b/binutils-2.21/ld/emulparams/shelf_vxworks.sh new file mode 100644 index 0000000..77619cb --- /dev/null +++ b/binutils-2.21/ld/emulparams/shelf_vxworks.sh @@ -0,0 +1,20 @@ +# If you change this file, please also look at files which source this one: +# shlelf_vxworks.sh + +SCRIPT_NAME=elf +NO_REL_RELOCS=yes +BIG_OUTPUT_FORMAT="elf32-sh-vxworks" +LITTLE_OUTPUT_FORMAT="elf32-shl-vxworks" +OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT" +TEXT_START_ADDR=0x1000 +MAXPAGESIZE='CONSTANT (MAXPAGESIZE)' +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +ENTRY=__start +SYMPREFIX=_ +GOT=".got ${RELOCATING-0} : { + PROVIDE(__GLOBAL_OFFSET_TABLE_ = .); + *(.got.plt) *(.got) }" +. ${srcdir}/emulparams/vxworks.sh diff --git a/binutils-2.21/ld/emulparams/shl.sh b/binutils-2.21/ld/emulparams/shl.sh new file mode 100644 index 0000000..5fbb165 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shl.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/sh.sh +OUTPUT_FORMAT="coff-shl" diff --git a/binutils-2.21/ld/emulparams/shlelf.sh b/binutils-2.21/ld/emulparams/shlelf.sh new file mode 100644 index 0000000..e19678b --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/shelf.sh +OUTPUT_FORMAT="elf32-shl" diff --git a/binutils-2.21/ld/emulparams/shlelf32.sh b/binutils-2.21/ld/emulparams/shlelf32.sh new file mode 100644 index 0000000..68c85dd --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf32.sh @@ -0,0 +1,2 @@ +OUTPUT_FORMAT="elf32-sh64l" +. ${srcdir}/emulparams/shelf32.sh diff --git a/binutils-2.21/ld/emulparams/shlelf32_linux.sh b/binutils-2.21/ld/emulparams/shlelf32_linux.sh new file mode 100644 index 0000000..81aea39 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf32_linux.sh @@ -0,0 +1,44 @@ +# If you change this file, please also look at files which source this one: +# shelf32_linux.sh + +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-sh64-linux" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH=sh +MACHINE=sh5 +ALIGNMENT=8 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes + + +DATA_START_SYMBOLS='PROVIDE (___data = .);' + +# If data is located right after .text (not explicitly specified), +# then we need to align it to an 8-byte boundary. +OTHER_READONLY_SECTIONS=' +PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0); +. = ALIGN (8); +' + +# Make _edata and .bss aligned by smuggling in an alignment directive. +OTHER_GOT_SECTIONS='. = ALIGN (8);' + +CTOR_START='___ctors = .;' +CTOR_END='___ctors_end = .;' +DTOR_START='___dtors = .;' +DTOR_END='___dtors_end = .;' + +# Do not use the varname=${varname-'string'} construct here; there are +# problems with that on some shells (e.g. on Solaris) where there is a bug +# that trigs when $varname contains a "}". +test -z "$OTHER_RELOCATING_SECTIONS" && OTHER_RELOCATING_SECTIONS=' + .cranges 0 : { *(.cranges) } +' + +# We need to adjust sizes in the .cranges section after relaxation, so +# we need an after_allocation function, and it goes in this file. +EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf} diff --git a/binutils-2.21/ld/emulparams/shlelf32_nbsd.sh b/binutils-2.21/ld/emulparams/shlelf32_nbsd.sh new file mode 100644 index 0000000..c4abe6b --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf32_nbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/shelf32_nbsd.sh + +OUTPUT_FORMAT="elf32-sh64l-nbsd" diff --git a/binutils-2.21/ld/emulparams/shlelf64.sh b/binutils-2.21/ld/emulparams/shlelf64.sh new file mode 100644 index 0000000..874b00c --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf64.sh @@ -0,0 +1,2 @@ +OUTPUT_FORMAT="elf64-sh64l" +. ${srcdir}/emulparams/shelf64.sh diff --git a/binutils-2.21/ld/emulparams/shlelf64_nbsd.sh b/binutils-2.21/ld/emulparams/shlelf64_nbsd.sh new file mode 100644 index 0000000..5b693c3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf64_nbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/shelf64_nbsd.sh + +OUTPUT_FORMAT="elf64-sh64l-nbsd" diff --git a/binutils-2.21/ld/emulparams/shlelf_fd.sh b/binutils-2.21/ld/emulparams/shlelf_fd.sh new file mode 100644 index 0000000..f1f4107 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf_fd.sh @@ -0,0 +1,16 @@ +# If you change this file, please also look at files which source this one: +# shelf_fd.sh + +. ${srcdir}/emulparams/shlelf_linux.sh +OUTPUT_FORMAT="elf32-sh-fdpic" +GOT=".got ${RELOCATING-0} : { *(.got.funcdesc) *(.got.plt) *(.got) }" +OTHER_GOT_RELOC_SECTIONS=" + .rela.got.funcdesc ${RELOCATING-0} : { *(.rela.got.funcdesc) } +" +OTHER_READONLY_SECTIONS=" + .rofixup : { + ${RELOCATING+__ROFIXUP_LIST__ = .;} + *(.rofixup) + ${RELOCATING+__ROFIXUP_END__ = .;} + } +" diff --git a/binutils-2.21/ld/emulparams/shlelf_linux.sh b/binutils-2.21/ld/emulparams/shlelf_linux.sh new file mode 100644 index 0000000..c14aae2 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf_linux.sh @@ -0,0 +1,19 @@ +# If you change this file, please also look at files which source this one: +# shelf_linux.sh shelf_fd.sh shlelf_fd.sh + +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-sh-linux" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x400000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +GENERATE_PIE_SCRIPT=yes + +DATA_START_SYMBOLS='PROVIDE (__data_start = .);'; + +OTHER_READWRITE_SECTIONS=" + .note.ABI-tag ${RELOCATING-0} : { *(.note.ABI-tag) }" diff --git a/binutils-2.21/ld/emulparams/shlelf_nbsd.sh b/binutils-2.21/ld/emulparams/shlelf_nbsd.sh new file mode 100644 index 0000000..d6ca82e --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf_nbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/shelf_nbsd.sh + +OUTPUT_FORMAT="elf32-shl-nbsd" diff --git a/binutils-2.21/ld/emulparams/shlelf_nto.sh b/binutils-2.21/ld/emulparams/shlelf_nto.sh new file mode 100644 index 0000000..16f6508 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf_nto.sh @@ -0,0 +1,11 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-shl" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x08040000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +TEXT_START_SYMBOLS='_btext = .;' +ENTRY=_start diff --git a/binutils-2.21/ld/emulparams/shlelf_vxworks.sh b/binutils-2.21/ld/emulparams/shlelf_vxworks.sh new file mode 100644 index 0000000..0a055b1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlelf_vxworks.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/shelf_vxworks.sh +OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT" diff --git a/binutils-2.21/ld/emulparams/shlsymbian.sh b/binutils-2.21/ld/emulparams/shlsymbian.sh new file mode 100644 index 0000000..9c6dfba --- /dev/null +++ b/binutils-2.21/ld/emulparams/shlsymbian.sh @@ -0,0 +1,17 @@ +TEXT_START_ADDR=0x8000 +SHLIB_TEXT_START_ADDR=0x8000 +SHLIB_DATA_ADDR=0x400000 + +. ${srcdir}/emulparams/shelf.sh + +# Use only two underscores for the constructor/destructor symbols +CTOR_START='__ctors = .;' +CTOR_END='__ctors_end = .;' +DTOR_START='__dtors = .;' +DTOR_END='__dtors_end = .;' + +# Suppress the .stack section. +test -z "$CREATE_SHLIB" && OTHER_SECTIONS="${RELOCATING+PROVIDE (_stack = 0x30000);}" + +OUTPUT_FORMAT="elf32-shl-symbian" +SCRIPT_NAME=elf32sh-symbian diff --git a/binutils-2.21/ld/emulparams/shpe.sh b/binutils-2.21/ld/emulparams/shpe.sh new file mode 100644 index 0000000..89fa461 --- /dev/null +++ b/binutils-2.21/ld/emulparams/shpe.sh @@ -0,0 +1,7 @@ +ARCH=sh +SCRIPT_NAME=pe +OUTPUT_FORMAT="pei-shl" +TEMPLATE_NAME=pe +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 diff --git a/binutils-2.21/ld/emulparams/solaris2.sh b/binutils-2.21/ld/emulparams/solaris2.sh new file mode 100644 index 0000000..dabbb05 --- /dev/null +++ b/binutils-2.21/ld/emulparams/solaris2.sh @@ -0,0 +1,10 @@ +# If you change this file, please also look at files which source this one: +# elf32_sparc_sol2.sh, elf64_sparc_sol2.sh, elf_i386_sol2.sh, +# elf_x86_64_sol2.sh. + +# The Solaris 2 ABI requires that two local symbols are present in every +# executable and shared object. +# Cf. Linker and Libraries Guide, Ch. 2, Link-Editor, Generating the Output +# File, p.63. +TEXT_START_SYMBOLS='_START_ = .;' +OTHER_END_SYMBOLS='_END_ = .;' diff --git a/binutils-2.21/ld/emulparams/sparcaout.sh b/binutils-2.21/ld/emulparams/sparcaout.sh new file mode 100644 index 0000000..e109064 --- /dev/null +++ b/binutils-2.21/ld/emulparams/sparcaout.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-sunos-big" +BIG_OUTPUT_FORMAT="a.out-sunos-big" +LITTLE_OUTPUT_FORMAT="a.out-sparc-little" +TEXT_START_ADDR=0x2020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x2000 ;; +esac +TARGET_PAGE_SIZE=0x2000 +ARCH=sparc diff --git a/binutils-2.21/ld/emulparams/sparclinux.sh b/binutils-2.21/ld/emulparams/sparclinux.sh new file mode 100644 index 0000000..e2164bc --- /dev/null +++ b/binutils-2.21/ld/emulparams/sparclinux.sh @@ -0,0 +1,9 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-sparc-linux" +TARGET_PAGE_SIZE=0x1000 +TEXT_START_ADDR=0x1020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0 ;; +esac +ARCH=sparc +TEMPLATE_NAME=linux diff --git a/binutils-2.21/ld/emulparams/sparcnbsd.sh b/binutils-2.21/ld/emulparams/sparcnbsd.sh new file mode 100644 index 0000000..f27daf3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/sparcnbsd.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=aout +TEXT_START_ADDR=0x1020 +OUTPUT_FORMAT="a.out-sparc-netbsd" +TARGET_PAGE_SIZE=0x1000 +ARCH=sparc diff --git a/binutils-2.21/ld/emulparams/st2000.sh b/binutils-2.21/ld/emulparams/st2000.sh new file mode 100644 index 0000000..0498832 --- /dev/null +++ b/binutils-2.21/ld/emulparams/st2000.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=st2000 +OUTPUT_FORMAT="coff-m68k" +TEXT_START_ADDR=0x0 +TARGET_PAGE_SIZE=128 +ARCH=m68k diff --git a/binutils-2.21/ld/emulparams/sun3.sh b/binutils-2.21/ld/emulparams/sun3.sh new file mode 100644 index 0000000..64c0c46 --- /dev/null +++ b/binutils-2.21/ld/emulparams/sun3.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-sunos-big" +TEXT_START_ADDR=0x2020 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0x2000 ;; +esac +TARGET_PAGE_SIZE=0x2000 +SEGMENT_SIZE=0x20000 +ARCH=m68k +TEMPLATE_NAME=sunos diff --git a/binutils-2.21/ld/emulparams/sun4.sh b/binutils-2.21/ld/emulparams/sun4.sh new file mode 100644 index 0000000..6cfbccc --- /dev/null +++ b/binutils-2.21/ld/emulparams/sun4.sh @@ -0,0 +1,7 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-sunos-big" +TEXT_START_ADDR=0x2020 +TARGET_PAGE_SIZE=0x2000 +ALIGNMENT=8 +ARCH=sparc +TEMPLATE_NAME=sunos diff --git a/binutils-2.21/ld/emulparams/tic30aout.sh b/binutils-2.21/ld/emulparams/tic30aout.sh new file mode 100644 index 0000000..2a4c13f --- /dev/null +++ b/binutils-2.21/ld/emulparams/tic30aout.sh @@ -0,0 +1,7 @@ +SCRIPT_NAME=tic30aout +OUTPUT_FORMAT="a.out-tic30" +OUTPUT_ARCH="tms320c30" +TEXT_START_ADDR=0x0 +TARGET_PAGE_SIZE=128 +ARCH=tms320c30 +BIG=1 diff --git a/binutils-2.21/ld/emulparams/tic30coff.sh b/binutils-2.21/ld/emulparams/tic30coff.sh new file mode 100644 index 0000000..df77943 --- /dev/null +++ b/binutils-2.21/ld/emulparams/tic30coff.sh @@ -0,0 +1,7 @@ +SCRIPT_NAME=tic30coff +OUTPUT_FORMAT="coff-tic30" +OUTPUT_ARCH="tms320c30" +TEXT_START_ADDR=0x0 +TARGET_PAGE_SIZE=128 +ARCH=tms320c30 +BIG=1 diff --git a/binutils-2.21/ld/emulparams/tic3xcoff.sh b/binutils-2.21/ld/emulparams/tic3xcoff.sh new file mode 100644 index 0000000..be543bf --- /dev/null +++ b/binutils-2.21/ld/emulparams/tic3xcoff.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=tic4xcoff +OUTPUT_FORMAT="coff2-tic4x" +OUTPUT_ARCH="tic3x" +ARCH=tic3x +TEMPLATE_NAME=ticoff +OUTPUT_FORMAT_TEMPLATE=tic4x diff --git a/binutils-2.21/ld/emulparams/tic3xcoff_onchip.sh b/binutils-2.21/ld/emulparams/tic3xcoff_onchip.sh new file mode 100644 index 0000000..1c1f8b1 --- /dev/null +++ b/binutils-2.21/ld/emulparams/tic3xcoff_onchip.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=tic4xcoff +OUTPUT_FORMAT="coff2-tic4x" +OUTPUT_ARCH="tic3x" +ARCH=tic3x +TEMPLATE_NAME=ticoff +OUTPUT_FORMAT_TEMPLATE=tic4x +ONCHIP=yes + diff --git a/binutils-2.21/ld/emulparams/tic4xcoff.sh b/binutils-2.21/ld/emulparams/tic4xcoff.sh new file mode 100644 index 0000000..2109572 --- /dev/null +++ b/binutils-2.21/ld/emulparams/tic4xcoff.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=tic4xcoff +OUTPUT_FORMAT="coff2-tic4x" +OUTPUT_ARCH="tic4x" +ARCH=tic4x +TEMPLATE_NAME=ticoff +OUTPUT_FORMAT_TEMPLATE=tic4x diff --git a/binutils-2.21/ld/emulparams/tic54xcoff.sh b/binutils-2.21/ld/emulparams/tic54xcoff.sh new file mode 100644 index 0000000..70c1ee2 --- /dev/null +++ b/binutils-2.21/ld/emulparams/tic54xcoff.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=tic54xcoff +OUTPUT_FORMAT="coff1-c54x" +ARCH=tic54x +ENTRY=_c_int00 +TEXT_START_ADDR=0x0080 +TARGET_PAGE_SIZE=0x1000 +TEMPLATE_NAME=ticoff +OUTPUT_FORMAT_TEMPLATE=tic54x diff --git a/binutils-2.21/ld/emulparams/tic80coff.sh b/binutils-2.21/ld/emulparams/tic80coff.sh new file mode 100644 index 0000000..088e9b0 --- /dev/null +++ b/binutils-2.21/ld/emulparams/tic80coff.sh @@ -0,0 +1,50 @@ +# This file is sourced by the genscripts.sh script. +# These are shell variables that are used later by either genscripts +# or on of the scripts that it sources. + +# The name of the scripttempl script to use. In this case, genscripts +# uses scripttempl/tic80coff.sc +# +SCRIPT_NAME=tic80coff + +# The name of the emultempl script to use. If set to "template" then +# genscripts.sh will use the script emultempl/template.em. If not set, +# then the default value is "generic". +# +# TEMPLATE_NAME= + +# If this is set to an nonempty string, genscripts.sh will invoke the +# scripttempl script an extra time to create a shared library script. +# +# GENERATE_SHLIB_SCRIPT= + +# The BFD output format to use. The scripttempl script will use it in +# an OUTPUT_FORMAT expression in the linker script. +# +OUTPUT_FORMAT="coff-tic80" + +# This is normally set to indicate the architecture to use, such as +# "sparc". The scripttempl script will normally use it in an OUTPUT_ARCH +# expression in the linker script. +# +ARCH=tic80 + +# Some scripttempl scripts use this to set the entry address in an ENTRY +# expression in the linker script. +# +# ENTRY= + +# The scripttempl script uses this to set the start address of the +# ".text" section. +# +TEXT_START_ADDR=0x2000000 + +# The genscripts.sh script uses this to set the default value of +# DATA_ALIGNMENT when running the scripttempl script. +# +# SEGMENT_SIZE= + +# If SEGMENT_SIZE is not defined, the genscripts.sh script uses this +# to define it. +# +TARGET_PAGE_SIZE=0x1000 diff --git a/binutils-2.21/ld/emulparams/v850.sh b/binutils-2.21/ld/emulparams/v850.sh new file mode 100644 index 0000000..96cdc68 --- /dev/null +++ b/binutils-2.21/ld/emulparams/v850.sh @@ -0,0 +1,15 @@ +MACHINE= +SCRIPT_NAME=v850 +OUTPUT_FORMAT="elf32-v850" +TEXT_START_ADDR=0x100000 +ZDATA_START_ADDR=0x160 +ROZDATA_START_ADDR="ALIGN (4)" +SDATA_START_ADDR="ALIGN (4)" +ROSDATA_START_ADDR="ALIGN (4)" +TDATA_START_ADDR="ALIGN (4)" +CALL_TABLE_START_ADDR="ALIGN (4)" +ARCH=v850 +MAXPAGESIZE=256 +ENTRY=_start +EMBEDDED=yes +TEMPLATE_NAME=elf32 diff --git a/binutils-2.21/ld/emulparams/vanilla.sh b/binutils-2.21/ld/emulparams/vanilla.sh new file mode 100644 index 0000000..eabb7cd --- /dev/null +++ b/binutils-2.21/ld/emulparams/vanilla.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=vanilla +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=128 +ARCH=unknown +TEMPLATE_NAME=vanilla diff --git a/binutils-2.21/ld/emulparams/vax.sh b/binutils-2.21/ld/emulparams/vax.sh new file mode 100644 index 0000000..1bd1c10 --- /dev/null +++ b/binutils-2.21/ld/emulparams/vax.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-vax-bsd" +TEXT_START_ADDR=0 +TARGET_PAGE_SIZE=1024 +ARCH=vax diff --git a/binutils-2.21/ld/emulparams/vaxnbsd.sh b/binutils-2.21/ld/emulparams/vaxnbsd.sh new file mode 100644 index 0000000..2d26831 --- /dev/null +++ b/binutils-2.21/ld/emulparams/vaxnbsd.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=aout +TEXT_START_ADDR=0x1020 +OUTPUT_FORMAT="a.out-vax-netbsd" +TARGET_PAGE_SIZE=0x1000 +ARCH=vax +EXECUTABLE_SYMBOLS='__DYNAMIC = 0;' diff --git a/binutils-2.21/ld/emulparams/vsta.sh b/binutils-2.21/ld/emulparams/vsta.sh new file mode 100644 index 0000000..0610f30 --- /dev/null +++ b/binutils-2.21/ld/emulparams/vsta.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=aout +OUTPUT_FORMAT="a.out-i386" +TEXT_START_ADDR=0x1020 +TARGET_PAGE_SIZE=0x1000 +SEGMENT_SIZE=0x400000 +case ${LD_FLAG} in + n|N) TEXT_START_ADDR=0 ;; +esac +ARCH=i386 + diff --git a/binutils-2.21/ld/emulparams/vxworks.sh b/binutils-2.21/ld/emulparams/vxworks.sh new file mode 100644 index 0000000..5760758 --- /dev/null +++ b/binutils-2.21/ld/emulparams/vxworks.sh @@ -0,0 +1,48 @@ +# If you change this file, please also look at files which source this one: +# armelf_vxworks.sh elf32ebmipvxworks.sh elf32elmipvxworks.sh +# elf_i386_vxworks.sh elf32ppcvxworks.sh elf32_sparc_vxworks.sh +# shelf_vxworks.sh + +# The Diab tools use a different init/fini convention. Initialization code +# is place in sections named ".init$NN". These sections are then concatenated +# into the .init section. It is important that .init$00 be first and .init$99 +# be last. The other sections should be sorted, but the current linker script +# parse does not seem to allow that with the SORT keyword in this context. +INIT_START='_init = .; + KEEP (*(.init$00)); + KEEP (*(.init$0[1-9])); + KEEP (*(.init$[1-8][0-9])); + KEEP (*(.init$9[0-8]));' +INIT_END='KEEP (*(.init$99));' +FINI_START='_fini = .; + KEEP (*(.fini$00)); + KEEP (*(.fini$0[1-9])); + KEEP (*(.fini$[1-8][0-9])); + KEEP (*(.fini$9[0-8]));' +FINI_END="KEEP (*(.fini\$99)); + PROVIDE (${SYMPREFIX}_etext = .);" + +OTHER_READWRITE_SECTIONS=".tls_data ${RELOCATING-0} : {${RELOCATING+ + __wrs_rtp_tls_data_start = .; + ___wrs_rtp_tls_data_start = .;} + *(.tls_data${RELOCATING+ .tls_data.*}) + }${RELOCATING+ + __wrs_rtp_tls_data_size = . - __wrs_rtp_tls_data_start; + ___wrs_rtp_tls_data_size = . - __wrs_rtp_tls_data_start; + __wrs_rtp_tls_data_align = ALIGNOF(.tls_data); + ___wrs_rtp_tls_data_align = ALIGNOF(.tls_data);} + .tls_vars ${RELOCATING-0} : {${RELOCATING+ + __wrs_rtp_tls_vars_start = .; + ___wrs_rtp_tls_vars_start = .;} + *(.tls_vars${RELOCATING+ .tls_vars.*}) + }${RELOCATING+ + __wrs_rtp_tls_vars_size = SIZEOF(.tls_vars); + ___wrs_rtp_tls_vars_size = SIZEOF(.tls_vars);}" + +TEXT_START_ADDR="(DEFINED (__wrs_rtp_base) ? __wrs_rtp_base : 0)" +ETEXT_NAME=etext_unrelocated +OTHER_END_SYMBOLS="PROVIDE (${SYMPREFIX}_ehdr = ${TEXT_START_ADDR});" +DATA_END_SYMBOLS=".edata : { PROVIDE (${SYMPREFIX}_edata = .); }" +VXWORKS_BASE_EM_FILE=$EXTRA_EM_FILE +EXTRA_EM_FILE=vxworks +unset EMBEDDED diff --git a/binutils-2.21/ld/emulparams/w65.sh b/binutils-2.21/ld/emulparams/w65.sh new file mode 100644 index 0000000..6f02b23 --- /dev/null +++ b/binutils-2.21/ld/emulparams/w65.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=w65 +OUTPUT_FORMAT="coff-w65" +TEXT_START_ADDR=0x1000 +TARGET_PAGE_SIZE=64 +ARCH=w65 diff --git a/binutils-2.21/ld/emulparams/z80.sh b/binutils-2.21/ld/emulparams/z80.sh new file mode 100644 index 0000000..a4fdbd5 --- /dev/null +++ b/binutils-2.21/ld/emulparams/z80.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=z80 +OUTPUT_FORMAT="coff-z80" +OUTPUT_ARCH="z80" +TEXT_START_ADDR=0x100 +EXTRA_EM_FILE=z80 +ARCH=z80 diff --git a/binutils-2.21/ld/emulparams/z8001.sh b/binutils-2.21/ld/emulparams/z8001.sh new file mode 100644 index 0000000..63645c3 --- /dev/null +++ b/binutils-2.21/ld/emulparams/z8001.sh @@ -0,0 +1,7 @@ +SCRIPT_NAME=z8000 +OUTPUT_FORMAT="coff-z8k" +OUTPUT_ARCH="z8001" +TEXT_START_ADDR=0x0 +TARGET_PAGE_SIZE=128 +ARCH=z8k +BIG=1 diff --git a/binutils-2.21/ld/emulparams/z8002.sh b/binutils-2.21/ld/emulparams/z8002.sh new file mode 100644 index 0000000..299b5f5 --- /dev/null +++ b/binutils-2.21/ld/emulparams/z8002.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=z8000 +OUTPUT_FORMAT="coff-z8k" +OUTPUT_ARCH="z8002" +TEXT_START_ADDR=0x0 +TARGET_PAGE_SIZE=128 +ARCH=z8002 |