diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-05-13 14:03:36 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-05-13 14:03:36 +0000 |
commit | de7cd2700ed72ead7af9d7335a5dd53e1e18ed6a (patch) | |
tree | 039a1b42834e41a0eae83bb616b58307e010d63e /gnu/usr.bin/binutils/ld/emulparams | |
parent | 80569f10d304683516f20f86bbafb107127ff63e (diff) |
Import binutils-2.11.2
- 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')
35 files changed, 517 insertions, 61 deletions
diff --git a/gnu/usr.bin/binutils/ld/emulparams/armelf.sh b/gnu/usr.bin/binutils/ld/emulparams/armelf.sh index 8c79b6495da..338b9ceb2e1 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/armelf.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/armelf.sh @@ -4,7 +4,8 @@ OUTPUT_FORMAT="elf32-littlearm" BIG_OUTPUT_FORMAT="elf32-bigarm" LITTLE_OUTPUT_FORMAT="elf32-littlearm" TEXT_START_ADDR=0x8000 -TEMPLATE_NAME=armelf +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=armelf OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)' OTHER_BSS_SYMBOLS='__bss_start__ = .;' OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;' diff --git a/gnu/usr.bin/binutils/ld/emulparams/armelf_linux.sh b/gnu/usr.bin/binutils/ld/emulparams/armelf_linux.sh index a85e8bd2b09..d04d967b87a 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/armelf_linux.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/armelf_linux.sh @@ -4,7 +4,8 @@ OUTPUT_FORMAT="elf32-littlearm" BIG_OUTPUT_FORMAT="elf32-bigarm" LITTLE_OUTPUT_FORMAT="elf32-littlearm" MAXPAGESIZE=0x8000 -TEMPLATE_NAME=armelf +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=armelf GENERATE_SHLIB_SCRIPT=yes DATA_START_SYMBOLS='__data_start = . ;'; @@ -12,8 +13,4 @@ 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 +TEXT_START_ADDR=0x00008000 diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr1200.sh b/gnu/usr.bin/binutils/ld/emulparams/avr1200.sh index 5f833ade6dc..24607e5f6ff 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/avr1200.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/avr1200.sh @@ -9,3 +9,4 @@ TEMPLATE_NAME=generic TEXT_LENGTH=1K DATA_LENGTH=0 EEPROM_LENGTH=64 +STACK=0 diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr23xx.sh b/gnu/usr.bin/binutils/ld/emulparams/avr23xx.sh index d8e45df9d4c..e85ef8621a9 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/avr23xx.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/avr23xx.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=2K DATA_LENGTH=128 EEPROM_LENGTH=128 +STACK=0x0DF diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr4433.sh b/gnu/usr.bin/binutils/ld/emulparams/avr4433.sh index 125a2036fd8..179fe1c6765 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/avr4433.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/avr4433.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=4K DATA_LENGTH=128 EEPROM_LENGTH=256 +STACK=0x0DF diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr44x4.sh b/gnu/usr.bin/binutils/ld/emulparams/avr44x4.sh index fb36aecb0ab..07fc57ec06e 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/avr44x4.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/avr44x4.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=4K DATA_LENGTH=256 EEPROM_LENGTH=256 +STACK=0x15F diff --git a/gnu/usr.bin/binutils/ld/emulparams/avr85xx.sh b/gnu/usr.bin/binutils/ld/emulparams/avr85xx.sh index fef39795b2c..f3700bd8c36 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/avr85xx.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/avr85xx.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=8K DATA_LENGTH=512 EEPROM_LENGTH=512 +STACK=0x25F diff --git a/gnu/usr.bin/binutils/ld/emulparams/avrmega103.sh b/gnu/usr.bin/binutils/ld/emulparams/avrmega103.sh index e727e8ba561..ca5a61e54b5 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/avrmega103.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/avrmega103.sh @@ -7,6 +7,6 @@ EMBEDDED=yes TEMPLATE_NAME=generic TEXT_LENGTH=128K -DATA_LENGTH=4K +DATA_LENGTH=4000 EEPROM_LENGTH=4K - +STACK=0x0FFF diff --git a/gnu/usr.bin/binutils/ld/emulparams/avrmega161.sh b/gnu/usr.bin/binutils/ld/emulparams/avrmega161.sh index 6319892b56a..fa5522216e3 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/avrmega161.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/avrmega161.sh @@ -1,4 +1,4 @@ -ARCH=avr:4 +ARCH=avr:5 MACHINE= SCRIPT_NAME=elf32avr OUTPUT_FORMAT="elf32-avr" @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=16K DATA_LENGTH=1K EEPROM_LENGTH=512 +STACK=0x45F diff --git a/gnu/usr.bin/binutils/ld/emulparams/avrmega603.sh b/gnu/usr.bin/binutils/ld/emulparams/avrmega603.sh index 1b7d14b4bde..4d60895650c 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/avrmega603.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/avrmega603.sh @@ -7,6 +7,6 @@ EMBEDDED=yes TEMPLATE_NAME=generic TEXT_LENGTH=64K -DATA_LENGTH=4K +DATA_LENGTH=4000 EEPROM_LENGTH=2K - +STACK=0x0FFF diff --git a/gnu/usr.bin/binutils/ld/emulparams/crisaout.sh b/gnu/usr.bin/binutils/ld/emulparams/crisaout.sh new file mode 100644 index 00000000000..bb9135aa81b --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/crisaout.sh @@ -0,0 +1,7 @@ +# 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 +NONPAGED_TEXT_START_ADDR=0 +ARCH=cris diff --git a/gnu/usr.bin/binutils/ld/emulparams/criself.sh b/gnu/usr.bin/binutils/ld/emulparams/criself.sh new file mode 100644 index 00000000000..4acd56a35b5 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/criself.sh @@ -0,0 +1,103 @@ +# 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" +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='.startup : { KEEP(*(.startup)) }' + +# TEXT_START_SYMBOLS doesn't get what we want which is the start of +# all read-only sections; there's at least .init and .fini before it. +# We have to resort to trickery. +# +# The __start dance is to get us through assumptions about entry +# symbols, and to clear _start for normal use with sane programs. +EXECUTABLE_SYMBOLS=' +PROVIDE (__Stext = .); +__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='PROVIDE (__Etext = .);' +DATA_START_SYMBOLS='PROVIDE (__Sdata = .);' + +# Smuggle an "OTHER_DATA_END_SYMBOLS" here. +OTHER_GOT_SECTIONS='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 = .); + PROVIDE (__end = .); + __Sbss = SIZEOF (.sbss) != 0 ? ADDR (.sbss) : ADDR (.bss); + PROVIDE (_bss_start = __Sbss); +' + +INIT_START=' + . = ALIGN(2); + ___init__start = .; + PROVIDE (___do_global_ctors = .); + SHORT (0xe1fc); /* push srp */ + SHORT (0xbe7e); +' + +INIT_END=' + SHORT (0x0d3e); /* jump [sp+] */ + PROVIDE (__init__end = .); + PROVIDE (___init__end = .); +' + +FINI_START=' + . = ALIGN (2); + ___fini__start = .; + PROVIDE (___do_global_dtors = .); + SHORT (0xe1fc); /* push srp */ + SHORT (0xbe7e); +' + +FINI_END=' + SHORT (0x0d3e); /* jump [sp+] */ + 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 = .; +' + + +# Smuggle an "OTHER_ALL_END_SYMBOLS" here. +# Also add the other symbols provided for rsim/xsim and elinux. +OTHER_RELOCATING_SECTIONS=' +PROVIDE (__Eall = .); +PROVIDE (__Endmem = 0x10000000); +PROVIDE (__Stacksize = 0); +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/crislinux.sh b/gnu/usr.bin/binutils/ld/emulparams/crislinux.sh new file mode 100644 index 00000000000..6be4f5803f6 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/crislinux.sh @@ -0,0 +1,41 @@ +# 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" +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=8192 + +# FIXME: GOT, PLT... + +# 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='PROVIDE (__Etext = .);' +DATA_START_SYMBOLS='PROVIDE (__Sdata = .);' + +# Smuggle an "OTHER_DATA_END_SYMBOLS" here. +OTHER_GOT_SECTIONS='PROVIDE (__Edata = .);' +OTHER_BSS_SYMBOLS='PROVIDE (__Sbss = .);' +OTHER_BSS_END_SYMBOLS='PROVIDE (__Ebss = .);' + +# Smuggle an "OTHER_ALL_END_SYMBOLS" here. +# Also add the other symbols provided for rsim/xsim and elinux. +OTHER_RELOCATING_SECTIONS=' +PROVIDE (__Eall = .); +PROVIDE(__Endmem = 0x10000000); +PROVIDE(__Stacksize = 0); +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32_i860.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32_i860.sh new file mode 100644 index 00000000000..531c493f5c5 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32_i860.sh @@ -0,0 +1,8 @@ +# A work in progress... +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i860-little" +BIG_OUTPUT_FORMAT="elf32-i860" +LITTLE_OUTPUT_FORMAT="elf32-i860-little" +PAGE_SIZE=0x1000 +MAXPAGESIZE=0x1000 +ARCH=i860 diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32btsmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32btsmip.sh new file mode 100644 index 00000000000..f6d1cf265be --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32btsmip.sh @@ -0,0 +1,31 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-tradbigmips" +BIG_OUTPUT_FORMAT="elf32-tradbigmips" +LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips" +TEXT_START_ADDR=0x0400000 +DATA_ADDR=0x10000000 +MAXPAGESIZE=0x40000 +NONPAGED_TEXT_START_ADDR=0x0400000 +SHLIB_TEXT_START_ADDR=0x0 +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/elf32lppcsim.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32lppcsim.sh new file mode 100644 index 00000000000..74959f84136 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32lppcsim.sh @@ -0,0 +1,18 @@ +TEMPLATE_NAME=elf32 +# If you change this, please also look at: +# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh +GENERATE_SHLIB_SCRIPT=yes +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-powerpcle" +TEXT_START_ADDR=0x10000000 +MAXPAGESIZE=0x10000 +ARCH=powerpc +MACHINE= +BSS_PLT= +EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' +OTHER_BSS_END_SYMBOLS='__end = .;' +OTHER_READWRITE_SECTIONS=' + .fixup : { *(.fixup) } + .got1 : { *(.got1) } + .got2 : { *(.got2) } +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32ltsmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32ltsmip.sh new file mode 100644 index 00000000000..90d7d64e896 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32ltsmip.sh @@ -0,0 +1,31 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-tradlittlemips" +BIG_OUTPUT_FORMAT="elf32-tradbigmips" +LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips" +TEXT_START_ADDR=0x0400000 +DATA_ADDR=0x10000000 +MAXPAGESIZE=0x40000 +NONPAGED_TEXT_START_ADDR=0x0400000 +SHLIB_TEXT_START_ADDR=0x0 +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 index b1f7b8c0f9e..2d063873075 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf32mcore.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32mcore.sh @@ -33,54 +33,20 @@ 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=' - +PARSE_AND_LIST_PROLOGUE=' #define OPTION_BASE_FILE 300 +' -#include "getopt.h" - -static struct option longopts[] = -{ +PARSE_AND_LIST_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; +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 = (PTR) fopen (optarg, FOPEN_WB); if (link_info.base_file == NULL) @@ -91,9 +57,4 @@ gld_elf32mcore_parse_args (argc, argv) 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 index 9996c7b6745..7c458a22ca3 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf32ppclinux.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32ppclinux.sh @@ -1,8 +1,18 @@ TEMPLATE_NAME=elf32 +# If you change this, please also look at: +# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh GENERATE_SHLIB_SCRIPT=yes -SCRIPT_NAME=elfppc +SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-powerpc" TEXT_START_ADDR=0x10000000 MAXPAGESIZE=0x10000 ARCH=powerpc MACHINE= +BSS_PLT= +OTHER_RELOCATING_SECTIONS=' + /DISCARD/ : { *(.fixup) } +' +OTHER_READWRITE_SECTIONS=' + .got1 : { *(.got1) } + .got2 : { *(.got2) } +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32ppcsim.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32ppcsim.sh new file mode 100644 index 00000000000..e25a170dbed --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32ppcsim.sh @@ -0,0 +1,18 @@ +TEMPLATE_NAME=elf32 +# If you change this, please also look at: +# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh +GENERATE_SHLIB_SCRIPT=yes +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-powerpc" +TEXT_START_ADDR=0x10000000 +MAXPAGESIZE=0x10000 +ARCH=powerpc +MACHINE= +BSS_PLT= +EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' +OTHER_BSS_END_SYMBOLS='__end = .;' +OTHER_READWRITE_SECTIONS=' + .fixup : { *(.fixup) } + .got1 : { *(.got1) } + .got2 : { *(.got2) } +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64_ia64.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64_ia64.sh new file mode 100644 index 00000000000..fff59924cb3 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf64_ia64.sh @@ -0,0 +1,15 @@ +# See genscripts.sh and ../scripttempl/elf.sc for the meaning of these. +SCRIPT_NAME=elf +ELFSIZE=64 +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf64-ia64-little" +ARCH=ia64 +MACHINE= +MAXPAGESIZE=0x10000 +TEXT_START_ADDR="0x4000000000000000" +DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))" +GENERATE_SHLIB_SCRIPT=yes +NOP=0x00300000010070000002000001000400 # a bundle full of nops +OTHER_GOT_SECTIONS='.IA_64.pltoff : { *(.IA_64.pltoff) }' +OTHER_PLT_RELOC_SECTIONS='.rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }' +OTHER_READONLY_SECTIONS='.opd : { *(.opd) } .IA_64.unwind_info : { *(.IA_64.unwind_info*) } .IA_64.unwind : { *(.IA_64.unwind*) }' diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64btsmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64btsmip.sh new file mode 100644 index 00000000000..f3d917cfb76 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf64btsmip.sh @@ -0,0 +1,44 @@ +# This is an ELF platform. +SCRIPT_NAME=elf + +# Handle both big- and little-ended 64-bit MIPS objects. +ARCH=mips +OUTPUT_FORMAT="elf64-tradbigmips" +BIG_OUTPUT_FORMAT="elf64-tradbigmips" +LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips" + +# Note that the elf32 template is used for 64-bit emulations as well +# as 32-bit emulations. +ELFSIZE=64 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +TEXT_START_ADDR=0x10000000 +DATA_ADDR=0x0400000000 +MAXPAGESIZE=0x100000 +NONPAGED_TEXT_START_ADDR=0x10000000 +SHLIB_TEXT_START_ADDR=0x0 +TEXT_DYNAMIC= +ENTRY=__start + +# GOT-related settings. +OTHER_GOT_SYMBOLS=' + _gp = ALIGN(16) + 0x7ff0; +' +OTHER_GOT_SECTIONS=' + .lit8 : { *(.lit8) } + .lit4 : { *(.lit4) } +' + +# Magic symbols. +TEXT_START_SYMBOLS='_ftext = . ;' +DATA_START_SYMBOLS='_fdata = . ;' +OTHER_BSS_SYMBOLS='_fbss = .;' + +# Magic sections. +INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' +OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)' +OTHER_SECTIONS=' + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64ltsmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64ltsmip.sh new file mode 100644 index 00000000000..ac2dcfc76b4 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf64ltsmip.sh @@ -0,0 +1,44 @@ +# This is an ELF platform. +SCRIPT_NAME=elf + +# Handle both big- and little-ended 64-bit MIPS objects. +ARCH=mips +OUTPUT_FORMAT="elf64-tradlittlemips" +BIG_OUTPUT_FORMAT="elf64-tradbigmips" +LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips" + +# Note that the elf32 template is used for 64-bit emulations as well +# as 32-bit emulations. +ELFSIZE=64 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +TEXT_START_ADDR=0x10000000 +DATA_ADDR=0x0400000000 +MAXPAGESIZE=0x100000 +NONPAGED_TEXT_START_ADDR=0x10000000 +SHLIB_TEXT_START_ADDR=0x0 +TEXT_DYNAMIC= +ENTRY=__start + +# GOT-related settings. +OTHER_GOT_SYMBOLS=' + _gp = ALIGN(16) + 0x7ff0; +' +OTHER_GOT_SECTIONS=' + .lit8 : { *(.lit8) } + .lit4 : { *(.lit4) } +' + +# Magic symbols. +TEXT_START_SYMBOLS='_ftext = . ;' +DATA_START_SYMBOLS='_fdata = . ;' +OTHER_BSS_SYMBOLS='_fbss = .;' + +# Magic sections. +INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' +OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)' +OTHER_SECTIONS=' + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf_i386_chaos.sh b/gnu/usr.bin/binutils/ld/emulparams/elf_i386_chaos.sh new file mode 100644 index 00000000000..32e7719de6c --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf_i386_chaos.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +TEXT_START_ADDR=0x40000000 +MAXPAGESIZE=0x1000 +NONPAGED_TEXT_START_ADDR=0x40000000 +ARCH=i386 +MACHINE= +NOP=0x9090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf_x86_64.sh b/gnu/usr.bin/binutils/ld/emulparams/elf_x86_64.sh new file mode 100644 index 00000000000..635748f6388 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/elf_x86_64.sh @@ -0,0 +1,11 @@ +SCRIPT_NAME=elf +ELFSIZE=64 +OUTPUT_FORMAT="elf64-x86-64" +TEXT_START_ADDR=0x400000 +MAXPAGESIZE=0x100000 +NONPAGED_TEXT_START_ADDR=0x400000 +ARCH=i386 +MACHINE= +NOP=0x9090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/gnu/usr.bin/binutils/ld/emulparams/hppalinux.sh b/gnu/usr.bin/binutils/ld/emulparams/hppalinux.sh new file mode 100644 index 00000000000..0a982984d01 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/hppalinux.sh @@ -0,0 +1,16 @@ +SCRIPT_NAME=elf +ELFSIZE=32 +OUTPUT_FORMAT="elf32-hppa-linux" +TEXT_START_ADDR=0x10000 +TARGET_PAGE_SIZE=0x10000 +MAXPAGESIZE=0x10000 +ARCH=hppa +MACHINE=hppa1.1 # We use 1.1 specific features. +NOP=0x08000240 +START="_start" +OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } ' +DATA_START_SYMBOLS='PROVIDE ($global$ = .);' +DATA_PLT= +GENERATE_SHLIB_SCRIPT=yes +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=hppaelf diff --git a/gnu/usr.bin/binutils/ld/emulparams/m68hc11elf.sh b/gnu/usr.bin/binutils/ld/emulparams/m68hc11elf.sh new file mode 100644 index 00000000000..2f6713e9dac --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/m68hc11elf.sh @@ -0,0 +1,13 @@ +MACHINE= +SCRIPT_NAME=elfm68hc11 +OUTPUT_FORMAT="elf32-m68hc11" +ROM_START_ADDR=0x08000 +ROM_SIZE=0x8000 +RAM_START_ADDR=0x01100 +RAM_SIZE=0x6F00 +TEXT_MEMORY=text +DATA_MEMORY=data +ARCH=m68hc11 +MAXPAGESIZE=32 +EMBEDDED=yes +GENERIC_BOARD=no diff --git a/gnu/usr.bin/binutils/ld/emulparams/m68hc11elfb.sh b/gnu/usr.bin/binutils/ld/emulparams/m68hc11elfb.sh new file mode 100644 index 00000000000..0f3016e2974 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/m68hc11elfb.sh @@ -0,0 +1,9 @@ +MACHINE= +SCRIPT_NAME=elfm68hc11 +OUTPUT_FORMAT="elf32-m68hc11" +TEXT_MEMORY=text +DATA_MEMORY=data +ARCH=m68hc11 +MAXPAGESIZE=32 +GENERIC_BOARD=yes + diff --git a/gnu/usr.bin/binutils/ld/emulparams/m68hc12elf.sh b/gnu/usr.bin/binutils/ld/emulparams/m68hc12elf.sh new file mode 100644 index 00000000000..1d9134c17f2 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/m68hc12elf.sh @@ -0,0 +1,13 @@ +MACHINE= +SCRIPT_NAME=elfm68hc12 +OUTPUT_FORMAT="elf32-m68hc12" +ROM_START_ADDR=0x08000 +ROM_SIZE=0x8000 +RAM_START_ADDR=0x01100 +RAM_SIZE=0x6F00 +TEXT_MEMORY=text +DATA_MEMORY=data +ARCH=m68hc12 +MAXPAGESIZE=32 +EMBEDDED=yes +GENERIC_BOARD=no diff --git a/gnu/usr.bin/binutils/ld/emulparams/m68hc12elfb.sh b/gnu/usr.bin/binutils/ld/emulparams/m68hc12elfb.sh new file mode 100644 index 00000000000..211978a3269 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/m68hc12elfb.sh @@ -0,0 +1,9 @@ +MACHINE= +SCRIPT_NAME=elfm68hc12 +OUTPUT_FORMAT="elf32-m68hc12" +TEXT_MEMORY=text +DATA_MEMORY=data +ARCH=m68hc12 +MAXPAGESIZE=32 +GENERIC_BOARD=yes + diff --git a/gnu/usr.bin/binutils/ld/emulparams/mipspe.sh b/gnu/usr.bin/binutils/ld/emulparams/mipspe.sh index 34674526c51..9dd9ce761ef 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/mipspe.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/mipspe.sh @@ -6,3 +6,4 @@ RELOCATEABLE_OUTPUT_FORMAT="ecoff-littlemips" TEMPLATE_NAME=pe SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" +ENTRY="_mainCRTStartup" diff --git a/gnu/usr.bin/binutils/ld/emulparams/shelf_linux.sh b/gnu/usr.bin/binutils/ld/emulparams/shelf_linux.sh new file mode 100644 index 00000000000..d7b7631fe63 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/shelf_linux.sh @@ -0,0 +1,14 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-shbig-linux" +TEXT_START_ADDR=0x400000 +MAXPAGESIZE=0x10000 +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +DATA_START_SYMBOLS='__data_start = . ;'; + +OTHER_READWRITE_SECTIONS=' + .note.ABI-tag : { *(.note.ABI-tag) } +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/shlelf_linux.sh b/gnu/usr.bin/binutils/ld/emulparams/shlelf_linux.sh new file mode 100644 index 00000000000..191def73bf9 --- /dev/null +++ b/gnu/usr.bin/binutils/ld/emulparams/shlelf_linux.sh @@ -0,0 +1,14 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-sh-linux" +TEXT_START_ADDR=0x400000 +MAXPAGESIZE=0x10000 +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +DATA_START_SYMBOLS='__data_start = . ;'; + +OTHER_READWRITE_SECTIONS=' + .note.ABI-tag : { *(.note.ABI-tag) } +' diff --git a/gnu/usr.bin/binutils/ld/emulparams/shpe.sh b/gnu/usr.bin/binutils/ld/emulparams/shpe.sh index 2f8664ccddc..44aeef33be4 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/shpe.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/shpe.sh @@ -4,3 +4,6 @@ OUTPUT_FORMAT="pei-shl" TEMPLATE_NAME=pe SUBSYSTEM=PE_DEF_SUBSYSTEM INITIAL_SYMBOL_CHAR=\"_\" +ENTRY="_mainCRTStartup" +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" diff --git a/gnu/usr.bin/binutils/ld/emulparams/tic54xcoff.sh b/gnu/usr.bin/binutils/ld/emulparams/tic54xcoff.sh new file mode 100644 index 00000000000..70c1ee2ce60 --- /dev/null +++ b/gnu/usr.bin/binutils/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 |