From: Ian Lance Taylor Date: Mon, 15 Jan 1996 20:13:04 +0000 (+0000) Subject: Add some Irix 5 support, mostly from Kazumoto Kojima X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe1379d45a55a99399806c755cf8533b7c22be67;p=binutils-gdb.git Add some Irix 5 support, mostly from Kazumoto Kojima : * emulparams/elf32bmip.sh (SCRIPT_NAME): Change to elfmips. (SHLIB_TEXT_START_ADDR): Define. (OTHER_GOT_SYMBOLS): Define. (OTHER_READWRITE_SECTIONS): Remove initialization of _gp. (EXECUTABLE_SYMBOLS): Don't define. (DYNAMIC_LINK): Don't define. * emulparams/elf32lmip.sh: Same changes as elf32bmip.sh. * scripttempl/elfmips.sc: New file. * configure.host (mips*-dec-bsd*): Change mips to mips*. (mips*-sgi-irix4*): Likewise. (mips*-sgi-irix5*): New entry. * Makefile.in (eelf32bmip.c): Depend upon elfmips.sc rather than elf.sc. (eelf32lmip.c): Likewise. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 3613f5fbee0..ee31948ce34 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,22 @@ +Mon Jan 15 15:07:19 1996 Ian Lance Taylor + + Add some Irix 5 support, mostly from Kazumoto Kojima + : + * emulparams/elf32bmip.sh (SCRIPT_NAME): Change to elfmips. + (SHLIB_TEXT_START_ADDR): Define. + (OTHER_GOT_SYMBOLS): Define. + (OTHER_READWRITE_SECTIONS): Remove initialization of _gp. + (EXECUTABLE_SYMBOLS): Don't define. + (DYNAMIC_LINK): Don't define. + * emulparams/elf32lmip.sh: Same changes as elf32bmip.sh. + * scripttempl/elfmips.sc: New file. + * configure.host (mips*-dec-bsd*): Change mips to mips*. + (mips*-sgi-irix4*): Likewise. + (mips*-sgi-irix5*): New entry. + * Makefile.in (eelf32bmip.c): Depend upon elfmips.sc rather than + elf.sc. + (eelf32lmip.c): Likewise. + Sat Jan 13 09:41:43 1996 Michael Meissner * scripttempl/elfppc.sc: Remove support for .rel.* sections. Add diff --git a/ld/Makefile.in b/ld/Makefile.in index 62e70329e62..37b675ca9fa 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -410,10 +410,10 @@ eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf_i386 eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32bmip eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfmips.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32lmip eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} diff --git a/ld/emulparams/elf32bmip.sh b/ld/emulparams/elf32bmip.sh new file mode 100644 index 00000000000..013674016c1 --- /dev/null +++ b/ld/emulparams/elf32bmip.sh @@ -0,0 +1,27 @@ +SCRIPT_NAME=elfmips +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_GOT_SYMBOLS=' + _gp = . + 0x7ff0; +' +OTHER_READWRITE_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 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/ld/emulparams/elf32lmip.sh b/ld/emulparams/elf32lmip.sh new file mode 100644 index 00000000000..1d060dd4c04 --- /dev/null +++ b/ld/emulparams/elf32lmip.sh @@ -0,0 +1,27 @@ +SCRIPT_NAME=elfmips +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_GOT_SYMBOLS=' + _gp = . + 0x7ff0; +' +OTHER_READWRITE_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 +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes diff --git a/ld/scripttempl/.Sanitize b/ld/scripttempl/.Sanitize index 1ec22aea773..8021484f64e 100644 --- a/ld/scripttempl/.Sanitize +++ b/ld/scripttempl/.Sanitize @@ -41,6 +41,7 @@ aout.sc delta68.sc ebmon29k.sc elf.sc +elfmips.sc elfppc.sc go32coff.sc h8300.sc diff --git a/ld/scripttempl/elfmips.sc b/ld/scripttempl/elfmips.sc new file mode 100644 index 00000000000..43c94c726d1 --- /dev/null +++ b/ld/scripttempl/elfmips.sc @@ -0,0 +1,167 @@ +# +# Unusual variables checked by this code: +# NOP - two byte opcode for no-op (defaults to 0) +# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start +# OTHER_READONLY_SECTIONS - other than .text .init .rodata ... +# (e.g., .PARISC.milli) +# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ... +# (e.g., .PARISC.global) +# OTHER_SECTIONS - at the end +# EXECUTABLE_SYMBOLS - symbols that must be defined for an +# executable (e.g., _DYNAMIC_LINK) +# TEXT_START_SYMBOLS - symbols that appear at the start of the +# .text section. +# DATA_START_SYMBOLS - symbols that appear at the start of the +# .data section. +# OTHER_BSS_SYMBOLS - symbols that appear at the start of the +# .bss section besides __bss_start. +# +# When adding sections, do note that the names of some sections are used +# when specifying the start address of the next. +# + +# We use a start address of __start for Irix 5, _start for other +# targets. This is for compatibility with Irix 5, and with old MIPS +# ELF toolchains. +if [ -z "$ENTRY" ]; then + case "${target_alias}" in + mips*-*-irix5*) ENTRY=__start ;; + *) ENTRY=_start ;; + esac +fi + +test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} +test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} +test "$LD_FLAG" = "N" && DATA_ADDR=. +INTERP=".interp ${RELOCATING-0} : { *(.interp) }" +cat <