diff options
Diffstat (limited to 'contrib/binutils/ld/emulparams')
40 files changed, 262 insertions, 49 deletions
diff --git a/contrib/binutils/ld/emulparams/arcelf.sh b/contrib/binutils/ld/emulparams/arcelf.sh index b1c9c17..6c524c9 100644 --- a/contrib/binutils/ld/emulparams/arcelf.sh +++ b/contrib/binutils/ld/emulparams/arcelf.sh @@ -1,11 +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" TEXT_START_ADDR=0x0 -MAXPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x0 ARCH=arc MACHINE= ENTRY=start -#TEMPLATE_NAME=elf32 diff --git a/contrib/binutils/ld/emulparams/arm_wince_pe.sh b/contrib/binutils/ld/emulparams/arm_wince_pe.sh new file mode 100644 index 0000000..2d0019f --- /dev/null +++ b/contrib/binutils/ld/emulparams/arm_wince_pe.sh @@ -0,0 +1,14 @@ +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 +ENTRY="WinMainCRTStartup" +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"\" +TARGET_PAGE_SIZE=0x1000 diff --git a/contrib/binutils/ld/emulparams/armelf.sh b/contrib/binutils/ld/emulparams/armelf.sh index 6dc50b2..ba9fdbe 100644 --- a/contrib/binutils/ld/emulparams/armelf.sh +++ b/contrib/binutils/ld/emulparams/armelf.sh @@ -6,12 +6,12 @@ LITTLE_OUTPUT_FORMAT="elf32-littlearm" TEXT_START_ADDR=0x8000 TEMPLATE_NAME=elf32 EXTRA_EM_FILE=armelf -OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)' +OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer)' 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)) } - .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }' +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+ __exidx_start = .; } @@ -24,7 +24,7 @@ GENERATE_SHLIB_SCRIPT=yes ARCH=arm MACHINE= -MAXPAGESIZE=256 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ENTRY=_start EMBEDDED=yes diff --git a/contrib/binutils/ld/emulparams/armelf_linux.sh b/contrib/binutils/ld/emulparams/armelf_linux.sh index 39b7f65..e7f301f 100644 --- a/contrib/binutils/ld/emulparams/armelf_linux.sh +++ b/contrib/binutils/ld/emulparams/armelf_linux.sh @@ -3,15 +3,15 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-littlearm" BIG_OUTPUT_FORMAT="elf32-bigarm" LITTLE_OUTPUT_FORMAT="elf32-littlearm" -MAXPAGESIZE=0x8000 -COMMONPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" TEMPLATE_NAME=elf32 EXTRA_EM_FILE=armelf GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes DATA_START_SYMBOLS='__data_start = . ;'; -OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)' +OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer)' OTHER_BSS_SYMBOLS='__bss_start__ = .;' OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;' OTHER_END_SYMBOLS='__end__ = . ;' diff --git a/contrib/binutils/ld/emulparams/armelf_nbsd.sh b/contrib/binutils/ld/emulparams/armelf_nbsd.sh index 3d94839..517cd62 100644 --- a/contrib/binutils/ld/emulparams/armelf_nbsd.sh +++ b/contrib/binutils/ld/emulparams/armelf_nbsd.sh @@ -1,5 +1,5 @@ . ${srcdir}/emulparams/armelf.sh -MAXPAGESIZE=0x8000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" TEXT_START_ADDR=0x00008000 TARGET2_TYPE=got-rel diff --git a/contrib/binutils/ld/emulparams/avr6.sh b/contrib/binutils/ld/emulparams/avr6.sh new file mode 100644 index 0000000..5326488 --- /dev/null +++ b/contrib/binutils/ld/emulparams/avr6.sh @@ -0,0 +1,11 @@ +ARCH=avr:6 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=1024K +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/contrib/binutils/ld/emulparams/elf32_sparc.sh b/contrib/binutils/ld/emulparams/elf32_sparc.sh index af23252..d09d9dc 100644 --- a/contrib/binutils/ld/emulparams/elf32_sparc.sh +++ b/contrib/binutils/ld/emulparams/elf32_sparc.sh @@ -1,8 +1,11 @@ +# 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" TEXT_START_ADDR=0x10000 -MAXPAGESIZE=0x10000 -COMMONPAGESIZE=0x2000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x10000 ALIGNMENT=8 ARCH=sparc diff --git a/contrib/binutils/ld/emulparams/elf32_spu.sh b/contrib/binutils/ld/emulparams/elf32_spu.sh new file mode 100644 index 0000000..4af608c --- /dev/null +++ b/contrib/binutils/ld/emulparams/elf32_spu.sh @@ -0,0 +1,20 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=spuelf +OUTPUT_FORMAT="elf32-spu" +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)) }" diff --git a/contrib/binutils/ld/emulparams/elf32bmip.sh b/contrib/binutils/ld/emulparams/elf32bmip.sh index 6148565..ce33674 100644 --- a/contrib/binutils/ld/emulparams/elf32bmip.sh +++ b/contrib/binutils/ld/emulparams/elf32bmip.sh @@ -1,5 +1,6 @@ # 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" @@ -7,15 +8,26 @@ BIG_OUTPUT_FORMAT="elf32-bigmips" LITTLE_OUTPUT_FORMAT="elf32-littlemips" TEXT_START_ADDR=0x0400000 test -n "${EMBEDDED}" || DATA_ADDR=0x10000000 -MAXPAGESIZE=0x40000 -COMMONPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x0400000 SHLIB_TEXT_START_ADDR=0x5ffe0000 TEXT_DYNAMIC= -INITIAL_READONLY_SECTIONS=" +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 @@ -46,5 +58,6 @@ OTHER_SECTIONS=' ARCH=mips MACHINE= TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=mipself GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh b/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh index b81ac49..49d2f85 100644 --- a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh +++ b/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh @@ -11,6 +11,7 @@ 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 ;; @@ -33,9 +34,16 @@ GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes TEXT_START_ADDR=0x10000000 -MAXPAGESIZE=0x100000 +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 @@ -56,7 +64,12 @@ TEXT_START_SYMBOLS='_ftext = . ;' DATA_START_SYMBOLS='_fdata = . ;' OTHER_BSS_SYMBOLS='_fbss = .;' -INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }" +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*) }" diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32.sh b/contrib/binutils/ld/emulparams/elf32bmipn32.sh index a320eb2..c26b6b3 100755 --- a/contrib/binutils/ld/emulparams/elf32bmipn32.sh +++ b/contrib/binutils/ld/emulparams/elf32bmipn32.sh @@ -3,7 +3,7 @@ OUTPUT_FORMAT="elf32-nbigmips" BIG_OUTPUT_FORMAT="elf32-nbigmips" LITTLE_OUTPUT_FORMAT="elf32-nlittlemips" SHLIB_TEXT_START_ADDR=0x5ffe0000 -COMMONPAGESIZE=0x1000 +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" # IRIX6 defines these symbols. 0x34 is the size of the ELF header. EXECUTABLE_SYMBOLS=" diff --git a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh b/contrib/binutils/ld/emulparams/elf32btsmipn32.sh index 5ca6797..10c5565 100644 --- a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh +++ b/contrib/binutils/ld/emulparams/elf32btsmipn32.sh @@ -5,7 +5,7 @@ OUTPUT_FORMAT="elf32-ntradbigmips" BIG_OUTPUT_FORMAT="elf32-ntradbigmips" LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips" -COMMONPAGESIZE=0x1000 +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" # Magic sections. OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)' diff --git a/contrib/binutils/ld/emulparams/elf32cr16.sh b/contrib/binutils/ld/emulparams/elf32cr16.sh new file mode 100644 index 0000000..756d02b --- /dev/null +++ b/contrib/binutils/ld/emulparams/elf32cr16.sh @@ -0,0 +1,6 @@ +SCRIPT_NAME=elf32cr16 +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-cr16" +ARCH=cr16 +ENTRY=_start +EXTRA_EM_FILE=cr16elf diff --git a/contrib/binutils/ld/emulparams/elf32mep.sh b/contrib/binutils/ld/emulparams/elf32mep.sh new file mode 100755 index 0000000..886ca47 --- /dev/null +++ b/contrib/binutils/ld/emulparams/elf32mep.sh @@ -0,0 +1,55 @@ +MACHINE= +SCRIPT_NAME=mep +OUTPUT_FORMAT="elf32-mep" +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/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh index 587b8d3..68962d7 100644 --- a/contrib/binutils/ld/emulparams/elf32ppc.sh +++ b/contrib/binutils/ld/emulparams/elf32ppc.sh @@ -1,5 +1,6 @@ # If you change this file, please also look at files which source this one: -# elf32lppc.sh elf32ppclinux.sh elf32ppcsim.sh +# 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 diff --git a/contrib/binutils/ld/emulparams/elf32ppccommon.sh b/contrib/binutils/ld/emulparams/elf32ppccommon.sh index b5fbc8d..1a12890 100644 --- a/contrib/binutils/ld/emulparams/elf32ppccommon.sh +++ b/contrib/binutils/ld/emulparams/elf32ppccommon.sh @@ -6,8 +6,8 @@ GENERATE_PIE_SCRIPT=yes SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-powerpc" TEXT_START_ADDR=0x01800000 -MAXPAGESIZE=0x10000 -COMMONPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH=powerpc:common MACHINE= EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' diff --git a/contrib/binutils/ld/emulparams/elf64_ia64.sh b/contrib/binutils/ld/emulparams/elf64_ia64.sh index c5be56e..7e5e54d 100644 --- a/contrib/binutils/ld/emulparams/elf64_ia64.sh +++ b/contrib/binutils/ld/emulparams/elf64_ia64.sh @@ -6,12 +6,12 @@ EXTRA_EM_FILE=ia64elf OUTPUT_FORMAT="elf64-ia64-little" ARCH=ia64 MACHINE= -MAXPAGESIZE=0x10000 +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=0x4000 + COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" fi TEXT_START_ADDR="0x4000000000000000" DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))" diff --git a/contrib/binutils/ld/emulparams/elf64_s390.sh b/contrib/binutils/ld/emulparams/elf64_s390.sh index ea75d31..a26bbb6 100644 --- a/contrib/binutils/ld/emulparams/elf64_s390.sh +++ b/contrib/binutils/ld/emulparams/elf64_s390.sh @@ -2,8 +2,8 @@ SCRIPT_NAME=elf ELFSIZE=64 OUTPUT_FORMAT="elf64-s390" TEXT_START_ADDR=0x80000000 -MAXPAGESIZE=0x1000 -COMMONPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x80000000 ARCH="s390:64-bit" MACHINE= diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh index 0c0f5d8..cef4bff 100644 --- a/contrib/binutils/ld/emulparams/elf64_sparc.sh +++ b/contrib/binutils/ld/emulparams/elf64_sparc.sh @@ -2,8 +2,8 @@ SCRIPT_NAME=elf ELFSIZE=64 TEMPLATE_NAME=elf32 OUTPUT_FORMAT="elf64-sparc" -MAXPAGESIZE=0x100000 -COMMONPAGESIZE=0x2000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH="sparc:v9" MACHINE= DATA_PLT= diff --git a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh index 232a321..21d13ab 100644 --- a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh +++ b/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh @@ -1,2 +1,4 @@ . ${srcdir}/emulparams/elf64_sparc.sh . ${srcdir}/emulparams/elf_fbsd.sh + +OUTPUT_FORMAT="elf64-sparc-freebsd" diff --git a/contrib/binutils/ld/emulparams/elf64alpha.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh index 47a0bb0..2c3b7d4 100644 --- a/contrib/binutils/ld/emulparams/elf64alpha.sh +++ b/contrib/binutils/ld/emulparams/elf64alpha.sh @@ -5,8 +5,8 @@ TEMPLATE_NAME=elf32 EXTRA_EM_FILE=alphaelf OUTPUT_FORMAT="elf64-alpha" TEXT_START_ADDR="0x120000000" -MAXPAGESIZE=0x10000 -COMMONPAGESIZE=0x2000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" NONPAGED_TEXT_START_ADDR="0x120000000" ARCH=alpha MACHINE= diff --git a/contrib/binutils/ld/emulparams/elf64bmip-defs.sh b/contrib/binutils/ld/emulparams/elf64bmip-defs.sh new file mode 100644 index 0000000..110f892 --- /dev/null +++ b/contrib/binutils/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/contrib/binutils/ld/emulparams/elf64bmip.sh b/contrib/binutils/ld/emulparams/elf64bmip.sh index a4ce6d4..0df6528 100755 --- a/contrib/binutils/ld/emulparams/elf64bmip.sh +++ b/contrib/binutils/ld/emulparams/elf64bmip.sh @@ -1,4 +1,4 @@ -. ${srcdir}/emulparams/elf32bmipn32-defs.sh +. ${srcdir}/emulparams/elf64bmip-defs.sh OUTPUT_FORMAT="elf64-bigmips" BIG_OUTPUT_FORMAT="elf64-bigmips" LITTLE_OUTPUT_FORMAT="elf64-littlemips" diff --git a/contrib/binutils/ld/emulparams/elf64btsmip.sh b/contrib/binutils/ld/emulparams/elf64btsmip.sh index 23a20c7..b9e80bb 100644 --- a/contrib/binutils/ld/emulparams/elf64btsmip.sh +++ b/contrib/binutils/ld/emulparams/elf64btsmip.sh @@ -1,7 +1,7 @@ # If you change this file, please also look at files which source this one: # elf64ltsmip.sh -. ${srcdir}/emulparams/elf32bmipn32-defs.sh +. ${srcdir}/emulparams/elf64bmip-defs.sh OUTPUT_FORMAT="elf64-tradbigmips" BIG_OUTPUT_FORMAT="elf64-tradbigmips" LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips" diff --git a/contrib/binutils/ld/emulparams/elf64ppc.sh b/contrib/binutils/ld/emulparams/elf64ppc.sh index 8285723..2fecba8 100644 --- a/contrib/binutils/ld/emulparams/elf64ppc.sh +++ b/contrib/binutils/ld/emulparams/elf64ppc.sh @@ -7,8 +7,8 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf64-powerpc" TEXT_START_ADDR=0x10000000 #SEGMENT_SIZE=0x10000000 -MAXPAGESIZE=0x10000 -COMMONPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH=powerpc:common64 MACHINE= NOP=0x60000000 @@ -31,7 +31,8 @@ OTHER_GOT_RELOC_SECTIONS=" .rela.toc ${RELOCATING-0} : { *(.rela.toc) }" OTHER_READWRITE_SECTIONS=" .toc1 ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) } - .opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }" + .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. diff --git a/contrib/binutils/ld/emulparams/elf_i386.sh b/contrib/binutils/ld/emulparams/elf_i386.sh index af7010b..bdeaebb 100644 --- a/contrib/binutils/ld/emulparams/elf_i386.sh +++ b/contrib/binutils/ld/emulparams/elf_i386.sh @@ -1,8 +1,8 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x08048000 -MAXPAGESIZE=0x1000 -COMMONPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x08048000 ARCH=i386 MACHINE= diff --git a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh index e018231..a652913 100644 --- a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh +++ b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh @@ -1,7 +1,7 @@ SCRIPT_NAME=elf_chaos OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x40000000 -MAXPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x40000000 ARCH=i386 MACHINE= diff --git a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh index a477a69..d62184f 100644 --- a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh +++ b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh @@ -1,7 +1,7 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x08048000 -MAXPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x08048000 ARCH=i386 MACHINE= diff --git a/contrib/binutils/ld/emulparams/elf_s390.sh b/contrib/binutils/ld/emulparams/elf_s390.sh index 8d057dc..d958504 100644 --- a/contrib/binutils/ld/emulparams/elf_s390.sh +++ b/contrib/binutils/ld/emulparams/elf_s390.sh @@ -1,8 +1,8 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-s390" TEXT_START_ADDR=0x00400000 -MAXPAGESIZE=0x1000 -COMMONPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x00400000 ARCH="s390:31-bit" MACHINE= diff --git a/contrib/binutils/ld/emulparams/elf_x86_64.sh b/contrib/binutils/ld/emulparams/elf_x86_64.sh index 35240df..449ccc9 100644 --- a/contrib/binutils/ld/emulparams/elf_x86_64.sh +++ b/contrib/binutils/ld/emulparams/elf_x86_64.sh @@ -2,8 +2,8 @@ SCRIPT_NAME=elf ELFSIZE=64 OUTPUT_FORMAT="elf64-x86-64" TEXT_START_ADDR=0x400000 -MAXPAGESIZE=0x100000 -COMMONPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x400000 ARCH="i386:x86-64" MACHINE= @@ -22,12 +22,16 @@ if [ "x${host}" = "x${target}" ]; then esac fi -# Linux modify the default library search path to first include +# Linux/Solaris modify the default library search path to first include # a 64-bit specific directory. case "$target" in - x86_64*-linux*) + 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/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh b/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh index 34258cb..35b6a62 100644 --- a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh +++ b/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh @@ -1,2 +1,3 @@ . ${srcdir}/emulparams/elf_x86_64.sh . ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf64-x86-64-freebsd" diff --git a/contrib/binutils/ld/emulparams/i386moss.sh b/contrib/binutils/ld/emulparams/i386moss.sh index eece447..659c7f2 100644 --- a/contrib/binutils/ld/emulparams/i386moss.sh +++ b/contrib/binutils/ld/emulparams/i386moss.sh @@ -1,7 +1,7 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x00002000 -MAXPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x00002000 ARCH=i386 MACHINE= diff --git a/contrib/binutils/ld/emulparams/i386nto.sh b/contrib/binutils/ld/emulparams/i386nto.sh index e4872ed..256d4c8 100644 --- a/contrib/binutils/ld/emulparams/i386nto.sh +++ b/contrib/binutils/ld/emulparams/i386nto.sh @@ -2,7 +2,7 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x08048000 TEXT_START_SYMBOLS='_btext = .;' -MAXPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x08048000 #SHLIB_TEXT_START_ADDR=0xb0300000 ARCH=i386 diff --git a/contrib/binutils/ld/emulparams/i386nw.sh b/contrib/binutils/ld/emulparams/i386nw.sh index 621b475..dd5558c 100644 --- a/contrib/binutils/ld/emulparams/i386nw.sh +++ b/contrib/binutils/ld/emulparams/i386nw.sh @@ -1,7 +1,7 @@ SCRIPT_NAME=nw OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x08000000 -MAXPAGESIZE=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x08000000 ARCH=i386 NOP=0x90909090 diff --git a/contrib/binutils/ld/emulparams/i386pep.sh b/contrib/binutils/ld/emulparams/i386pep.sh new file mode 100644 index 0000000..d20f3ab --- /dev/null +++ b/contrib/binutils/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 +ENTRY="_mainCRTStartup" +SUBSYSTEM=PE_DEF_SUBSYSTEM +INITIAL_SYMBOL_CHAR=\"_\" +TARGET_PAGE_SIZE=0x1000 diff --git a/contrib/binutils/ld/emulparams/ppcnw.sh b/contrib/binutils/ld/emulparams/ppcnw.sh index c3ead43..14b2745 100644 --- a/contrib/binutils/ld/emulparams/ppcnw.sh +++ b/contrib/binutils/ld/emulparams/ppcnw.sh @@ -2,6 +2,6 @@ SCRIPT_NAME=nw OUTPUT_FORMAT="elf32-powerpc" TEXT_START_ADDR=0x0400000 DATA_ADDR=0x10000000 -MAXPAGESIZE=0x40000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" NONPAGED_TEXT_START_ADDR=0x0400000 ARCH=powerpc diff --git a/contrib/binutils/ld/emulparams/scoreelf.sh b/contrib/binutils/ld/emulparams/scoreelf.sh new file mode 100644 index 0000000..e138de2 --- /dev/null +++ b/contrib/binutils/ld/emulparams/scoreelf.sh @@ -0,0 +1,31 @@ +MACHINE= +SCRIPT_NAME=elf +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-bigscore" +BIG_OUTPUT_FORMAT="elf32-bigscore" +LITTLE_OUTPUT_FORMAT="elf32-littlescore" +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 + +ARCH=score +MACHINE= +ENTRY=_start +EMBEDDED=yes +GENERATE_SHLIB_SCRIPT=yes diff --git a/contrib/binutils/ld/emulparams/shelf_uclinux.sh b/contrib/binutils/ld/emulparams/shelf_uclinux.sh new file mode 100644 index 0000000..2af5da4 --- /dev/null +++ b/contrib/binutils/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/contrib/binutils/ld/emulparams/shelf_vxworks.sh b/contrib/binutils/ld/emulparams/shelf_vxworks.sh new file mode 100644 index 0000000..a87d529 --- /dev/null +++ b/contrib/binutils/ld/emulparams/shelf_vxworks.sh @@ -0,0 +1,19 @@ +# If you change this file, please also look at files which source this one: +# shlelf_vxworks.sh + +SCRIPT_NAME=elf +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/contrib/binutils/ld/emulparams/shlelf_vxworks.sh b/contrib/binutils/ld/emulparams/shlelf_vxworks.sh new file mode 100644 index 0000000..0a055b1 --- /dev/null +++ b/contrib/binutils/ld/emulparams/shlelf_vxworks.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/shelf_vxworks.sh +OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT" |