summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/ld/emulparams
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-09-12 14:48:46 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-09-12 14:48:46 +0000
commit62531eff7138b73da2a6d2b382959964d67d4269 (patch)
tree176edf1a30027217d6fcff6f9f1c049d990d75cf /gnu/usr.bin/binutils/ld/emulparams
parent9ba342053c015a9be4f7f1ad1efdf21220329946 (diff)
Import binutils-2.10
- only the binutils package (no gdb here) - don't import libiberty and texinfo, they are elsewhere - remove all .info* generated files
Diffstat (limited to 'gnu/usr.bin/binutils/ld/emulparams')
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/arcelf.sh11
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/arm_epoc_pe.sh9
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/armelf.sh22
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/armelf_linux.sh19
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/armelf_linux26.sh20
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/armelf_oabi.sh21
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/armnbsd.sh7
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/avr1200.sh11
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/avr23xx.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/avr4433.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/avr44x4.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/avr85xx.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/avrmega103.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/avrmega161.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/avrmega603.sh12
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/d10velf.sh5
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/d30v_e.sh20
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/d30v_o.sh20
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/d30velf.sh20
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32_i960.sh8
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32bmipn32.sh75
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32bsmip.sh31
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32ebmip.sh7
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32elmip.sh7
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32fr30.sh10
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32i370.sh8
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32lsmip.sh31
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32mcore.sh99
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf32ppclinux.sh8
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf64bmip.sh79
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf64hppa.sh56
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/elf_i386_be.sh11
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/i386beos.sh5
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/i386pe_posix.sh9
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/m32relf.sh5
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/mcorepe.sh9
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/mipspe.sh8
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/mn10200.sh2
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/mn10300.sh2
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/pjelf.sh5
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/pjlelf.sh5
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/shpe.sh6
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/tic30aout.sh7
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/tic30coff.sh7
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/tic80coff.sh56
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/v850.sh14
46 files changed, 825 insertions, 14 deletions
diff --git a/gnu/usr.bin/binutils/ld/emulparams/arcelf.sh b/gnu/usr.bin/binutils/ld/emulparams/arcelf.sh
new file mode 100644
index 00000000000..b1c9c1760ce
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/arcelf.sh
@@ -0,0 +1,11 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearc"
+LITTLE_OUTPUT_FORMAT="elf32-littlearc"
+BIG_OUTPUT_FORMAT="elf32-bigarc"
+TEXT_START_ADDR=0x0
+MAXPAGESIZE=0x1000
+NONPAGED_TEXT_START_ADDR=0x0
+ARCH=arc
+MACHINE=
+ENTRY=start
+#TEMPLATE_NAME=elf32
diff --git a/gnu/usr.bin/binutils/ld/emulparams/arm_epoc_pe.sh b/gnu/usr.bin/binutils/ld/emulparams/arm_epoc_pe.sh
new file mode 100644
index 00000000000..04fa22db879
--- /dev/null
+++ b/gnu/usr.bin/binutils/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
+ENTRY="_mainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/gnu/usr.bin/binutils/ld/emulparams/armelf.sh b/gnu/usr.bin/binutils/ld/emulparams/armelf.sh
new file mode 100644
index 00000000000..8c79b6495da
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/armelf.sh
@@ -0,0 +1,22 @@
+MACHINE=
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm"
+BIG_OUTPUT_FORMAT="elf32-bigarm"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+TEXT_START_ADDR=0x8000
+TEMPLATE_NAME=armelf
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+
+GENERATE_SHLIB_SCRIPT=yes
+
+ARCH=arm
+MACHINE=
+MAXPAGESIZE=256
+ENTRY=_start
+EMBEDDED=yes
+
+# Hmmm, there's got to be a better way. This sets the stack to the
+# top of the simulator memory (2^19 bytes).
+OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/armelf_linux.sh b/gnu/usr.bin/binutils/ld/emulparams/armelf_linux.sh
new file mode 100644
index 00000000000..a85e8bd2b09
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/armelf_linux.sh
@@ -0,0 +1,19 @@
+ARCH=arm
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm"
+BIG_OUTPUT_FORMAT="elf32-bigarm"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+MAXPAGESIZE=0x8000
+TEMPLATE_NAME=armelf
+GENERATE_SHLIB_SCRIPT=yes
+
+DATA_START_SYMBOLS='__data_start = . ;';
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+
+# This needs to be high enough so that we can load ld.so below it,
+# yet low enough to stay away from the mmap area at 0x40000000.
+# Also, it is small enough so that relocs which are pointing
+# at absolute 0 will still be fixed up.
+TEXT_START_ADDR=0x02000000
diff --git a/gnu/usr.bin/binutils/ld/emulparams/armelf_linux26.sh b/gnu/usr.bin/binutils/ld/emulparams/armelf_linux26.sh
new file mode 100644
index 00000000000..36d1b0ec5c7
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/armelf_linux26.sh
@@ -0,0 +1,20 @@
+ARCH=arm
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm"
+BIG_OUTPUT_FORMAT="elf32-bigarm"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+MAXPAGESIZE=0x8000
+TEMPLATE_NAME=armelf
+GENERATE_SHLIB_SCRIPT=yes
+
+DATA_START_SYMBOLS='__data_start = . ;';
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+
+# This needs to be high enough so that we can load ld.so below it,
+# yet low enough to stay away from the mmap area at 0x01100000.
+# Also, it is small enough so that relocs which are pointing
+# at absolute 0 will still be fixed up.
+# These values give us about 0.5MB for ld.so, 16.5MB for user
+# programs, and 15MB for mmap which seems a reasonable compromise.
+TEXT_START_ADDR=0x00080000
diff --git a/gnu/usr.bin/binutils/ld/emulparams/armelf_oabi.sh b/gnu/usr.bin/binutils/ld/emulparams/armelf_oabi.sh
new file mode 100644
index 00000000000..d568328d63a
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/armelf_oabi.sh
@@ -0,0 +1,21 @@
+MACHINE=
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlearm-oabi"
+BIG_OUTPUT_FORMAT="elf32-bigarm-oabi"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm-oabi"
+TEXT_START_ADDR=0x8000
+TEMPLATE_NAME=armelf_oabi
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_BSS_SYMBOLS='__bss_start__ = .;'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
+
+
+ARCH=arm
+MACHINE=
+MAXPAGESIZE=256
+ENTRY=_start
+EMBEDDED=yes
+
+# Hmmm, there's got to be a better way. This sets the stack to the
+# top of the simulator memory (2^19 bytes).
+OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/armnbsd.sh b/gnu/usr.bin/binutils/ld/emulparams/armnbsd.sh
new file mode 100644
index 00000000000..fc2779164a0
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/armnbsd.sh
@@ -0,0 +1,7 @@
+SCRIPT_NAME=aout
+TEXT_START_ADDR=0x1020
+OUTPUT_FORMAT="a.out-arm-netbsd"
+TARGET_PAGE_SIZE=0x1000
+ARCH=arm
+EXECUTABLE_SYMBOLS='__DYNAMIC = 0;'
+NONPAGED_TEXT_START_ADDR=0x1000
diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr1200.sh b/gnu/usr.bin/binutils/ld/emulparams/avr1200.sh
new file mode 100644
index 00000000000..5f833ade6dc
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/avr1200.sh
@@ -0,0 +1,11 @@
+ARCH=avr:1
+MACHINE=
+SCRIPT_NAME=elf32avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=generic
+
+TEXT_LENGTH=1K
+DATA_LENGTH=0
+EEPROM_LENGTH=64
diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr23xx.sh b/gnu/usr.bin/binutils/ld/emulparams/avr23xx.sh
new file mode 100644
index 00000000000..d8e45df9d4c
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/avr23xx.sh
@@ -0,0 +1,12 @@
+ARCH=avr:2
+MACHINE=
+SCRIPT_NAME=elf32avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=generic
+
+TEXT_LENGTH=2K
+DATA_LENGTH=128
+EEPROM_LENGTH=128
+
diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr4433.sh b/gnu/usr.bin/binutils/ld/emulparams/avr4433.sh
new file mode 100644
index 00000000000..125a2036fd8
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/avr4433.sh
@@ -0,0 +1,12 @@
+ARCH=avr:2
+MACHINE=
+SCRIPT_NAME=elf32avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=generic
+
+TEXT_LENGTH=4K
+DATA_LENGTH=128
+EEPROM_LENGTH=256
+
diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr44x4.sh b/gnu/usr.bin/binutils/ld/emulparams/avr44x4.sh
new file mode 100644
index 00000000000..fb36aecb0ab
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/avr44x4.sh
@@ -0,0 +1,12 @@
+ARCH=avr:2
+MACHINE=
+SCRIPT_NAME=elf32avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=generic
+
+TEXT_LENGTH=4K
+DATA_LENGTH=256
+EEPROM_LENGTH=256
+
diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr85xx.sh b/gnu/usr.bin/binutils/ld/emulparams/avr85xx.sh
new file mode 100644
index 00000000000..fef39795b2c
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/avr85xx.sh
@@ -0,0 +1,12 @@
+ARCH=avr:2
+MACHINE=
+SCRIPT_NAME=elf32avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=generic
+
+TEXT_LENGTH=8K
+DATA_LENGTH=512
+EEPROM_LENGTH=512
+
diff --git a/gnu/usr.bin/binutils/ld/emulparams/avrmega103.sh b/gnu/usr.bin/binutils/ld/emulparams/avrmega103.sh
new file mode 100644
index 00000000000..e727e8ba561
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/avrmega103.sh
@@ -0,0 +1,12 @@
+ARCH=avr:3
+MACHINE=
+SCRIPT_NAME=elf32avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=generic
+
+TEXT_LENGTH=128K
+DATA_LENGTH=4K
+EEPROM_LENGTH=4K
+
diff --git a/gnu/usr.bin/binutils/ld/emulparams/avrmega161.sh b/gnu/usr.bin/binutils/ld/emulparams/avrmega161.sh
new file mode 100644
index 00000000000..6319892b56a
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/avrmega161.sh
@@ -0,0 +1,12 @@
+ARCH=avr:4
+MACHINE=
+SCRIPT_NAME=elf32avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=generic
+
+TEXT_LENGTH=16K
+DATA_LENGTH=1K
+EEPROM_LENGTH=512
+
diff --git a/gnu/usr.bin/binutils/ld/emulparams/avrmega603.sh b/gnu/usr.bin/binutils/ld/emulparams/avrmega603.sh
new file mode 100644
index 00000000000..1b7d14b4bde
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/avrmega603.sh
@@ -0,0 +1,12 @@
+ARCH=avr:3
+MACHINE=
+SCRIPT_NAME=elf32avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=generic
+
+TEXT_LENGTH=64K
+DATA_LENGTH=4K
+EEPROM_LENGTH=2K
+
diff --git a/gnu/usr.bin/binutils/ld/emulparams/d10velf.sh b/gnu/usr.bin/binutils/ld/emulparams/d10velf.sh
index 3597d6a3124..c8c4214edec 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/d10velf.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/d10velf.sh
@@ -1,8 +1,9 @@
MACHINE=
SCRIPT_NAME=elfd10v
OUTPUT_FORMAT="elf32-d10v"
-TEXT_START_ADDR=0x1000000
-READONLY_START_ADDR=0x2000004
+TEXT_START_ADDR=0x01000000
+READONLY_START_ADDR=0x02000004
ARCH=d10v
MAXPAGESIZE=32
EMBEDDED=t
+TEMPLATE_NAME=elf32
diff --git a/gnu/usr.bin/binutils/ld/emulparams/d30v_e.sh b/gnu/usr.bin/binutils/ld/emulparams/d30v_e.sh
new file mode 100644
index 00000000000..a8ab5a25dbd
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/d30v_e.sh
@@ -0,0 +1,20 @@
+MACHINE=
+SCRIPT_NAME=elfd30v
+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/gnu/usr.bin/binutils/ld/emulparams/d30v_o.sh b/gnu/usr.bin/binutils/ld/emulparams/d30v_o.sh
new file mode 100644
index 00000000000..6cbcb42abdb
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/d30v_o.sh
@@ -0,0 +1,20 @@
+MACHINE=
+SCRIPT_NAME=elfd30v
+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/gnu/usr.bin/binutils/ld/emulparams/d30velf.sh b/gnu/usr.bin/binutils/ld/emulparams/d30velf.sh
new file mode 100644
index 00000000000..949de78655a
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/d30velf.sh
@@ -0,0 +1,20 @@
+MACHINE=
+SCRIPT_NAME=elfd30v
+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/gnu/usr.bin/binutils/ld/emulparams/elf32_i960.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32_i960.sh
new file mode 100644
index 00000000000..10ec3fa573b
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32_i960.sh
@@ -0,0 +1,8 @@
+SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
+OUTPUT_FORMAT="elf32-i960"
+ARCH=i960
+MACHINE=
+TEXT_START_ADDR=0
+EMBEDDED=yes
+MAXPAGESIZE=0x2000
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32bmipn32.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32bmipn32.sh
new file mode 100644
index 00000000000..56f42a9b296
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32bmipn32.sh
@@ -0,0 +1,75 @@
+# 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
+
+TEXT_START_ADDR=0x10000000
+MAXPAGESIZE=0x100000
+ENTRY=__start
+
+# GOT-related settings.
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+ .lit8 : { *(.lit8) }
+ .lit4 : { *(.lit4) }
+ .srdata : { *(.srdata) }
+'
+
+# Magic symbols.
+TEXT_START_SYMBOLS='_ftext = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+OTHER_BSS_SYMBOLS='_fbss = .;'
+# 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=
+
+OTHER_RELOCATING_SECTIONS='
+ .MIPS.events.text :
+ {
+ *(.MIPS.events.text)
+ *(.MIPS.events.gnu.linkonce.t*)
+ }
+ .MIPS.content.text :
+ {
+ *(.MIPS.content.text)
+ *(.MIPS.content.gnu.linkonce.t*)
+ }
+ .MIPS.events.data :
+ {
+ *(.MIPS.events.data)
+ *(.MIPS.events.gnu.linkonce.d*)
+ }
+ .MIPS.content.data :
+ {
+ *(.MIPS.content.data)
+ *(.MIPS.content.gnu.linkonce.d*)
+ }
+ .MIPS.events.rodata :
+ {
+ *(.MIPS.events.rodata)
+ *(.MIPS.events.gnu.linkonce.r*)
+ }
+ .MIPS.content.rodata :
+ {
+ *(.MIPS.content.rodata)
+ *(.MIPS.content.gnu.linkonce.r*)
+ }
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32bsmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32bsmip.sh
new file mode 100644
index 00000000000..09f13076437
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32bsmip.sh
@@ -0,0 +1,31 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-bigmips"
+BIG_OUTPUT_FORMAT="elf32-bigmips"
+LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+TEXT_START_ADDR=0x0400000
+DATA_ADDR=0x10000000
+MAXPAGESIZE=0x40000
+NONPAGED_TEXT_START_ADDR=0x0400000
+SHLIB_TEXT_START_ADDR=0x5ffe0000
+TEXT_DYNAMIC=
+INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+ .lit8 : { *(.lit8) }
+ .lit4 : { *(.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) }
+'
+ARCH=mips
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+ENTRY=__start
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32ebmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32ebmip.sh
index a81a25dfe20..00ea8fd9c96 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf32ebmip.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32ebmip.sh
@@ -1,17 +1,16 @@
-SCRIPT_NAME=elfmips
+SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
-OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_READWRITE_SECTIONS='
+OTHER_GOT_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32elmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32elmip.sh
index c3a69d93823..cf008c8f117 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/elf32elmip.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32elmip.sh
@@ -1,17 +1,16 @@
-SCRIPT_NAME=elfmips
+SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
-OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_READWRITE_SECTIONS='
+OTHER_GOT_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32fr30.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32fr30.sh
new file mode 100644
index 00000000000..1be1f534b11
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32fr30.sh
@@ -0,0 +1,10 @@
+MACHINE=
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-fr30"
+TEXT_START_ADDR=0x10000
+ARCH=fr30
+MAXPAGESIZE=256
+ENTRY=_start
+EMBEDDED=yes
+NOP=0x9fa0
+OTHER_RELOCATING_SECTIONS='PROVIDE (__stack = 0x200000);' \ No newline at end of file
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32i370.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32i370.sh
new file mode 100644
index 00000000000..d9d5d85617a
--- /dev/null
+++ b/gnu/usr.bin/binutils/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=0x40000
+ARCH=i370
+MACHINE=
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32lsmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32lsmip.sh
new file mode 100644
index 00000000000..4bdc8a10e69
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32lsmip.sh
@@ -0,0 +1,31 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-littlemips"
+BIG_OUTPUT_FORMAT="elf32-bigmips"
+LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+TEXT_START_ADDR=0x0400000
+DATA_ADDR=0x10000000
+MAXPAGESIZE=0x40000
+NONPAGED_TEXT_START_ADDR=0x0400000
+SHLIB_TEXT_START_ADDR=0x5ffe0000
+TEXT_DYNAMIC=
+INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+ .lit8 : { *(.lit8) }
+ .lit4 : { *(.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) }
+'
+ARCH=mips
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+ENTRY=__start
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32mcore.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32mcore.sh
new file mode 100644
index 00000000000..b1f7b8c0f9e
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32mcore.sh
@@ -0,0 +1,99 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-mcore-little"
+BIG_OUTPUT_FORMAT="elf32-mcore-big"
+LITTLE_OUTPUT_FORMAT="elf32-mcore-little"
+PAGE_SIZE=0x1000
+TARGET_PAGE_SIZE=0x400
+MAXPAGESIZE=0x1000
+TEXT_START_ADDR=0
+NONPAGED_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=0x0e0e
+
+OTHER_BSS_SYMBOLS="__bss_start__ = . ;"
+OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;"
+
+# Hmmm, there's got to be a better way. This sets the stack to the
+# top of the simulator memory (2^19 bytes).
+OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
+
+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_ARGS='
+
+#define OPTION_BASE_FILE 300
+
+#include "getopt.h"
+
+static struct option longopts[] =
+{
+ {"base-file", required_argument, NULL, OPTION_BASE_FILE},
+ {NULL, no_argument, NULL, 0}
+};
+
+static void
+gld_elf32mcore_list_options (file)
+ FILE * file;
+{
+ fprintf (file, _(" --base_file <basefile> Generate a base file for relocatable DLLs\n"));
+}
+
+static int
+gld_elf32mcore_parse_args (argc, argv)
+ int argc;
+ char ** argv;
+{
+ int longind;
+ int optc;
+ int prevoptind = optind;
+ int prevopterr = opterr;
+ int wanterror;
+ static int lastoptind = -1;
+
+ if (lastoptind != optind)
+ opterr = 0;
+
+ wanterror = opterr;
+ lastoptind = optind;
+
+ optc = getopt_long_only (argc, argv, "-", longopts, & longind);
+ opterr = prevopterr;
+
+ switch (optc)
+ {
+ default:
+ if (wanterror)
+ xexit (1);
+ optind = prevoptind;
+ return 0;
+
+ case OPTION_BASE_FILE:
+ link_info.base_file = (PTR) 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;
+ }
+
+ return 1;
+}
+
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32ppclinux.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32ppclinux.sh
new file mode 100644
index 00000000000..9996c7b6745
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf32ppclinux.sh
@@ -0,0 +1,8 @@
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+SCRIPT_NAME=elfppc
+OUTPUT_FORMAT="elf32-powerpc"
+TEXT_START_ADDR=0x10000000
+MAXPAGESIZE=0x10000
+ARCH=powerpc
+MACHINE=
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64bmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64bmip.sh
new file mode 100644
index 00000000000..a4852d53cf4
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf64bmip.sh
@@ -0,0 +1,79 @@
+# This is an ELF platform.
+SCRIPT_NAME=elf
+
+# Handle both big- and little-ended 32-bit MIPS objects.
+ARCH=mips
+OUTPUT_FORMAT="elf64-bigmips"
+BIG_OUTPUT_FORMAT="elf64-bigmips"
+LITTLE_OUTPUT_FORMAT="elf64-littlemips"
+
+# Note that the elf32 template is used for 64-bit emulations as well
+# as 32-bit emulations.
+ELFSIZE=64
+TEMPLATE_NAME=elf32
+
+TEXT_START_ADDR=0x10000000
+MAXPAGESIZE=0x100000
+ENTRY=__start
+
+# GOT-related settings.
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+ .lit8 : { *(.lit8) }
+ .lit4 : { *(.lit4) }
+ .srdata : { *(.srdata) }
+'
+
+# Magic symbols.
+TEXT_START_SYMBOLS='_ftext = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+OTHER_BSS_SYMBOLS='_fbss = .;'
+# IRIX6 defines these symbols. 0x40 is the size of the ELF header.
+EXECUTABLE_SYMBOLS="
+ __dso_displacement = 0;
+ __elf_header = ${TEXT_START_ADDR};
+ __program_header_table = ${TEXT_START_ADDR} + 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=
+
+
+OTHER_RELOCATING_SECTIONS='
+ .MIPS.events.text :
+ {
+ *(.MIPS.events.text)
+ *(.MIPS.events.gnu.linkonce.t*)
+ }
+ .MIPS.content.text :
+ {
+ *(.MIPS.content.text)
+ *(.MIPS.content.gnu.linkonce.t*)
+ }
+ .MIPS.events.data :
+ {
+ *(.MIPS.events.data)
+ *(.MIPS.events.gnu.linkonce.d*)
+ }
+ .MIPS.content.data :
+ {
+ *(.MIPS.content.data)
+ *(.MIPS.content.gnu.linkonce.d*)
+ }
+ .MIPS.events.rodata :
+ {
+ *(.MIPS.events.rodata)
+ *(.MIPS.events.gnu.linkonce.r*)
+ }
+ .MIPS.content.rodata :
+ {
+ *(.MIPS.content.rodata)
+ *(.MIPS.content.gnu.linkonce.r*)
+ }
+'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64hppa.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64hppa.sh
new file mode 100644
index 00000000000..829ad43345c
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf64hppa.sh
@@ -0,0 +1,56 @@
+SCRIPT_NAME=elf
+ELFSIZE=64
+OUTPUT_FORMAT="elf64-hppa"
+LIB_PATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
+TEXT_START_ADDR=0x4000000000001000
+DATA_ADDR=0x8000000000001000
+
+# 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
+
+TARGET_PAGE_SIZE=4096
+MAXPAGESIZE=4096
+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 : { *(.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 : { *(.opd) } PROVIDE (__gp = .); .plt : { *(.plt) } .dlt : { *(.dlt) }'
+
+# The PA64 ELF port has two additional bss sections. huge bss and thread bss.
+# Make sure they end up in the appropriate location. We also have to set
+# __TLS_SIZE to the size of the thread bss section.
+OTHER_BSS_SECTIONS='.hbss : { *(.hbss) } .tbss : { *(.tbss) }'
+#OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));'
+OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = 0);'
+
+# HPs use .dlt where systems use .got. Sigh.
+OTHER_GOT_RELOC_SECTIONS='.rela.dlt : { *(.rela.dlt) }'
+
+# 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;'
+
+# The linker is required to define these two symbols.
+EXECUTABLE_SYMBOLS='PROVIDE (__SYSTEM_ID = 0x214); PROVIDE (_FPU_STATUS = 0x0);'
+DATA_PLT=
+
+# .dynamic should be at the start of the .text segment.
+TEXT_DYNAMIC=
+
+# 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/gnu/usr.bin/binutils/ld/emulparams/elf_i386_be.sh b/gnu/usr.bin/binutils/ld/emulparams/elf_i386_be.sh
new file mode 100644
index 00000000000..9977a069a4a
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/elf_i386_be.sh
@@ -0,0 +1,11 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-i386"
+TEXT_START_ADDR=0x80000000
+#SHLIB_TEXT_START_ADDR=0x80000000
+NONPAGED_TEXT_START_ADDR=0x80000000
+MAXPAGESIZE=0x1000
+ARCH=i386
+MACHINE=
+NOP=0x9090
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/gnu/usr.bin/binutils/ld/emulparams/i386beos.sh b/gnu/usr.bin/binutils/ld/emulparams/i386beos.sh
new file mode 100644
index 00000000000..869da5f41ba
--- /dev/null
+++ b/gnu/usr.bin/binutils/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/gnu/usr.bin/binutils/ld/emulparams/i386pe_posix.sh b/gnu/usr.bin/binutils/ld/emulparams/i386pe_posix.sh
new file mode 100644
index 00000000000..37f51b5eeea
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/i386pe_posix.sh
@@ -0,0 +1,9 @@
+ARCH=i386
+SCRIPT_NAME=pe
+OUTPUT_FORMAT="pei-i386"
+RELOCATEABLE_OUTPUT_FORMAT="pe-i386"
+TEMPLATE_NAME=pe
+ENTRY="___PosixProcessStartup"
+SUBSYSTEM=7
+EXECUTABLE_NAME=a.out
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/gnu/usr.bin/binutils/ld/emulparams/m32relf.sh b/gnu/usr.bin/binutils/ld/emulparams/m32relf.sh
index eed56091d43..cd7705afff6 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/m32relf.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/m32relf.sh
@@ -1,5 +1,6 @@
MACHINE=
SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
OUTPUT_FORMAT="elf32-m32r"
TEXT_START_ADDR=0x100
ARCH=m32r
@@ -8,5 +9,5 @@ MAXPAGESIZE=32
EMBEDDED=yes
# Hmmm, there's got to be a better way. This sets the stack to the
-# top of the simulator memory (currently 1M).
-OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x100000);'
+# top of simulator memory (8MB).
+OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x800000);'
diff --git a/gnu/usr.bin/binutils/ld/emulparams/mcorepe.sh b/gnu/usr.bin/binutils/ld/emulparams/mcorepe.sh
new file mode 100644
index 00000000000..3c19e02ca1e
--- /dev/null
+++ b/gnu/usr.bin/binutils/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
+ENTRY="_mainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/gnu/usr.bin/binutils/ld/emulparams/mipspe.sh b/gnu/usr.bin/binutils/ld/emulparams/mipspe.sh
new file mode 100644
index 00000000000..34674526c51
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/mipspe.sh
@@ -0,0 +1,8 @@
+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=\"_\"
diff --git a/gnu/usr.bin/binutils/ld/emulparams/mn10200.sh b/gnu/usr.bin/binutils/ld/emulparams/mn10200.sh
index afa46e2aa30..63243225e37 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/mn10200.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/mn10200.sh
@@ -4,7 +4,7 @@ OUTPUT_FORMAT="elf32-mn10200"
TEXT_START_ADDR=0x0
ARCH=mn10200
MACHINE=
-MAXPAGESIZE=256
+MAXPAGESIZE=1
ENTRY=_start
EMBEDDED=yes
diff --git a/gnu/usr.bin/binutils/ld/emulparams/mn10300.sh b/gnu/usr.bin/binutils/ld/emulparams/mn10300.sh
index b5ae3b7ee87..44a40e5a764 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/mn10300.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/mn10300.sh
@@ -4,7 +4,7 @@ OUTPUT_FORMAT="elf32-mn10300"
TEXT_START_ADDR=0x0
ARCH=mn10300
MACHINE=
-MAXPAGESIZE=256
+MAXPAGESIZE=1
ENTRY=_start
EMBEDDED=yes
diff --git a/gnu/usr.bin/binutils/ld/emulparams/pjelf.sh b/gnu/usr.bin/binutils/ld/emulparams/pjelf.sh
new file mode 100644
index 00000000000..acfd2b346c5
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/pjelf.sh
@@ -0,0 +1,5 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-pj"
+TEXT_START_ADDR=0x1000000
+MAXPAGESIZE=0x1000
+ARCH=pj
diff --git a/gnu/usr.bin/binutils/ld/emulparams/pjlelf.sh b/gnu/usr.bin/binutils/ld/emulparams/pjlelf.sh
new file mode 100644
index 00000000000..35958fdea6a
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/pjlelf.sh
@@ -0,0 +1,5 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-pjl"
+TEXT_START_ADDR=0x1000000
+MAXPAGESIZE=0x1000
+ARCH=pj
diff --git a/gnu/usr.bin/binutils/ld/emulparams/shpe.sh b/gnu/usr.bin/binutils/ld/emulparams/shpe.sh
new file mode 100644
index 00000000000..2f8664ccddc
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/shpe.sh
@@ -0,0 +1,6 @@
+ARCH=sh
+SCRIPT_NAME=pe
+OUTPUT_FORMAT="pei-shl"
+TEMPLATE_NAME=pe
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
diff --git a/gnu/usr.bin/binutils/ld/emulparams/tic30aout.sh b/gnu/usr.bin/binutils/ld/emulparams/tic30aout.sh
new file mode 100644
index 00000000000..2a4c13f598f
--- /dev/null
+++ b/gnu/usr.bin/binutils/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/gnu/usr.bin/binutils/ld/emulparams/tic30coff.sh b/gnu/usr.bin/binutils/ld/emulparams/tic30coff.sh
new file mode 100644
index 00000000000..df779437337
--- /dev/null
+++ b/gnu/usr.bin/binutils/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/gnu/usr.bin/binutils/ld/emulparams/tic80coff.sh b/gnu/usr.bin/binutils/ld/emulparams/tic80coff.sh
new file mode 100644
index 00000000000..70703231fd5
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/tic80coff.sh
@@ -0,0 +1,56 @@
+# 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
+
+# If this is defined, the genscripts.sh script sets TEXT_START_ADDR to
+# its value before running the scripttempl script for the -n and -N
+# options.
+#
+# NONPAGED_TEXT_START_ADDR=
+
+# 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/gnu/usr.bin/binutils/ld/emulparams/v850.sh b/gnu/usr.bin/binutils/ld/emulparams/v850.sh
new file mode 100644
index 00000000000..78bfbd3882d
--- /dev/null
+++ b/gnu/usr.bin/binutils/ld/emulparams/v850.sh
@@ -0,0 +1,14 @@
+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