diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2002-10-11 06:01:20 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2002-10-11 06:01:20 +0000 |
| commit | 88e5f95a93c944cdcf31c26c3d93baddc8d18872 (patch) | |
| tree | fc657a1fb5e0ceeb952b5e5ad8744fec0332849c /contrib/binutils/ld/emulparams | |
| parent | bde4025733b25eb758560c82632106eafd34580e (diff) | |
Notes
Diffstat (limited to 'contrib/binutils/ld/emulparams')
| -rw-r--r-- | contrib/binutils/ld/emulparams/armelfb_nbsd.sh | 2 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf32_sparc.sh | 1 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf32ppc.sh | 19 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf64_ia64.sh | 4 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf64_sparc.sh | 1 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf64alpha.sh | 6 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh | 1 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf64ppc.sh | 28 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf_i386.sh | 1 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf_i386_chaos.sh | 2 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf_i386_fbsd.sh | 1 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/elf_x86_64.sh | 1 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/i386nto.sh | 12 | ||||
| -rw-r--r-- | contrib/binutils/ld/emulparams/ppcmacos.sh | 2 |
14 files changed, 75 insertions, 6 deletions
diff --git a/contrib/binutils/ld/emulparams/armelfb_nbsd.sh b/contrib/binutils/ld/emulparams/armelfb_nbsd.sh new file mode 100644 index 000000000000..7ab6ce06a51e --- /dev/null +++ b/contrib/binutils/ld/emulparams/armelfb_nbsd.sh @@ -0,0 +1,2 @@ +. ${srcdir}/emulparams/armelf_nbsd.sh +OUTPUT_FORMAT="elf32-bigarm" diff --git a/contrib/binutils/ld/emulparams/elf32_sparc.sh b/contrib/binutils/ld/emulparams/elf32_sparc.sh index d8b81e763d18..15a837df28c5 100644 --- a/contrib/binutils/ld/emulparams/elf32_sparc.sh +++ b/contrib/binutils/ld/emulparams/elf32_sparc.sh @@ -2,6 +2,7 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-sparc" TEXT_START_ADDR=0x10000 MAXPAGESIZE=0x10000 +COMMONPAGESIZE=0x2000 NONPAGED_TEXT_START_ADDR=0x10000 ALIGNMENT=8 ARCH=sparc diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh index 261e4bf1fbc0..f88198f631ff 100644 --- a/contrib/binutils/ld/emulparams/elf32ppc.sh +++ b/contrib/binutils/ld/emulparams/elf32ppc.sh @@ -17,3 +17,22 @@ OTHER_READWRITE_SECTIONS=" .got1 ${RELOCATING-0} : { *(.got1) } .got2 ${RELOCATING-0} : { *(.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} "*) + LIB_PATH=${libdir} + for lib in ${NATIVE_LIB_DIRS}; do + case :${LIB_PATH}: in + *:${lib}:*) ;; + *) LIB_PATH=${LIB_PATH}:${lib} ;; + esac + done + # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. + case "$EMULATION_NAME" in + *64*) LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,64:,g`$LIB_PATH + esac + esac +fi diff --git a/contrib/binutils/ld/emulparams/elf64_ia64.sh b/contrib/binutils/ld/emulparams/elf64_ia64.sh index b659a7c69c3c..76f35e462f9d 100644 --- a/contrib/binutils/ld/emulparams/elf64_ia64.sh +++ b/contrib/binutils/ld/emulparams/elf64_ia64.sh @@ -7,6 +7,10 @@ OUTPUT_FORMAT="elf64-ia64-little" ARCH=ia64 MACHINE= MAXPAGESIZE=0x10000 +if test -n "$CREATE_SHLIB"; then + # Optimize shared libraries for 16K page size + COMMONPAGESIZE=0x4000 +fi TEXT_START_ADDR="0x4000000000000000" DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))" GENERATE_SHLIB_SCRIPT=yes diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh index dae3f21edb3c..a4706b5fe8ad 100644 --- a/contrib/binutils/ld/emulparams/elf64_sparc.sh +++ b/contrib/binutils/ld/emulparams/elf64_sparc.sh @@ -3,6 +3,7 @@ ELFSIZE=64 TEMPLATE_NAME=elf32 OUTPUT_FORMAT="elf64-sparc" MAXPAGESIZE=0x100000 +COMMONPAGESIZE=0x2000 ARCH="sparc:v9" MACHINE= DATA_PLT= diff --git a/contrib/binutils/ld/emulparams/elf64alpha.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh index 9f42fd9ba4c7..3dd28ef58c00 100644 --- a/contrib/binutils/ld/emulparams/elf64alpha.sh +++ b/contrib/binutils/ld/emulparams/elf64alpha.sh @@ -5,13 +5,15 @@ TEMPLATE_NAME=elf32 OUTPUT_FORMAT="elf64-alpha" TEXT_START_ADDR="0x120000000" MAXPAGESIZE=0x10000 +COMMONPAGESIZE=0x2000 NONPAGED_TEXT_START_ADDR="0x120000000" ARCH=alpha MACHINE= GENERATE_SHLIB_SCRIPT=yes DATA_PLT= -# Note that the string of digits is little-endian. -NOP=0x0000fe2f # unop +# 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/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh b/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh index 37fbfa26eb4a..fd4a0a41eb4a 100644 --- a/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh +++ b/contrib/binutils/ld/emulparams/elf64alpha_fbsd.sh @@ -1,2 +1,3 @@ . ${srcdir}/emulparams/elf64alpha.sh . ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf64-alpha-freebsd" diff --git a/contrib/binutils/ld/emulparams/elf64ppc.sh b/contrib/binutils/ld/emulparams/elf64ppc.sh index 2169862348c0..e3a81771c3b5 100644 --- a/contrib/binutils/ld/emulparams/elf64ppc.sh +++ b/contrib/binutils/ld/emulparams/elf64ppc.sh @@ -5,8 +5,10 @@ GENERATE_SHLIB_SCRIPT=yes SCRIPT_NAME=elf OUTPUT_FORMAT="elf64-powerpc" TEXT_START_ADDR=0x10000000 -MAXPAGESIZE=0x40000 -ARCH=powerpc +DATA_ADDR="ALIGN (0x10000000) + (. & (${MAXPAGESIZE} - 1))" +MAXPAGESIZE=0x10000 +COMMONPAGESIZE=0x1000 +ARCH=powerpc:common64 MACHINE= NOP=0x60000000 EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' @@ -15,6 +17,7 @@ CTOR_START='PROVIDE (__CTOR_LIST__ = .); PROVIDE (___CTOR_LIST__ = .);' CTOR_END='PROVIDE (__CTOR_END__ = .); PROVIDE (___CTOR_END__ = .);' DTOR_START='PROVIDE (__DTOR_LIST__ = .); PROVIDE (___DTOR_LIST__ = .);' DTOR_END='PROVIDE (__DTOR_END__ = .); PROVIDE (___DTOR_END__ = .);' +OTHER_TEXT_SECTIONS="*(.sfpr .glink)" BSS_PLT= OTHER_BSS_SYMBOLS=" .tocbss ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}" @@ -26,4 +29,23 @@ 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)} : { *(.opd) }" + .opd ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { KEEP (*(.opd)) }" + +# 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} "*) + LIB_PATH=${libdir} + for lib in ${NATIVE_LIB_DIRS}; do + case :${LIB_PATH}: in + *:${lib}:*) ;; + *) LIB_PATH=${LIB_PATH}:${lib} ;; + esac + done + # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. + case "$EMULATION_NAME" in + *64*) LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,64:,g`$LIB_PATH + esac + esac +fi diff --git a/contrib/binutils/ld/emulparams/elf_i386.sh b/contrib/binutils/ld/emulparams/elf_i386.sh index 53dd54b0ac8e..f1b8522fe6f6 100644 --- a/contrib/binutils/ld/emulparams/elf_i386.sh +++ b/contrib/binutils/ld/emulparams/elf_i386.sh @@ -2,6 +2,7 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x08048000 MAXPAGESIZE=0x1000 +COMMONPAGESIZE=0x1000 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 f7ad3cf6c4e1..e018231f043e 100644 --- a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh +++ b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh @@ -1,4 +1,4 @@ -SCRIPT_NAME=elf +SCRIPT_NAME=elf_chaos OUTPUT_FORMAT="elf32-i386" TEXT_START_ADDR=0x40000000 MAXPAGESIZE=0x1000 diff --git a/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh b/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh index 237145a21b98..23785983ff84 100644 --- a/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh +++ b/contrib/binutils/ld/emulparams/elf_i386_fbsd.sh @@ -1,2 +1,3 @@ . ${srcdir}/emulparams/elf_i386.sh . ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf32-i386-freebsd" diff --git a/contrib/binutils/ld/emulparams/elf_x86_64.sh b/contrib/binutils/ld/emulparams/elf_x86_64.sh index 4f7433e541c0..1786e339467a 100644 --- a/contrib/binutils/ld/emulparams/elf_x86_64.sh +++ b/contrib/binutils/ld/emulparams/elf_x86_64.sh @@ -3,6 +3,7 @@ ELFSIZE=64 OUTPUT_FORMAT="elf64-x86-64" TEXT_START_ADDR=0x400000 MAXPAGESIZE=0x100000 +COMMONPAGESIZE=0x1000 NONPAGED_TEXT_START_ADDR=0x400000 ARCH="i386:x86-64" MACHINE= diff --git a/contrib/binutils/ld/emulparams/i386nto.sh b/contrib/binutils/ld/emulparams/i386nto.sh new file mode 100644 index 000000000000..e4872edec511 --- /dev/null +++ b/contrib/binutils/ld/emulparams/i386nto.sh @@ -0,0 +1,12 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-i386" +TEXT_START_ADDR=0x08048000 +TEXT_START_SYMBOLS='_btext = .;' +MAXPAGESIZE=0x1000 +NONPAGED_TEXT_START_ADDR=0x08048000 +#SHLIB_TEXT_START_ADDR=0xb0300000 +ARCH=i386 +MACHINE= +NOP=0x9090 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/contrib/binutils/ld/emulparams/ppcmacos.sh b/contrib/binutils/ld/emulparams/ppcmacos.sh index b6b800c2c6c8..9f02af404f0c 100644 --- a/contrib/binutils/ld/emulparams/ppcmacos.sh +++ b/contrib/binutils/ld/emulparams/ppcmacos.sh @@ -1,4 +1,6 @@ TEMPLATE_NAME=aix SCRIPT_NAME=aix OUTPUT_FORMAT="xcoff-powermac" +OUTPUT_FORMAT_32BIT="xcoff-powermac" +OUTPUT_FORMAT_64BIT="xcoff-powermac" ARCH=powerpc |
