From c51a280688f358732fccf7f8526451e0b4cabade Mon Sep 17 00:00:00 2001 From: Per Fogelstrom Date: Sun, 14 Jul 1996 20:41:33 +0000 Subject: Fixes to make MIPS arc port to use in tree binutils. --- gnu/usr.bin/binutils/bfd/config.bfd | 4 ++++ gnu/usr.bin/binutils/bfd/elf.c | 6 ++++++ gnu/usr.bin/binutils/bfd/elf32-mips.c | 2 +- gnu/usr.bin/binutils/config.guess | 3 +++ gnu/usr.bin/binutils/gas/configure | 1 + gnu/usr.bin/binutils/gas/configure.in | 1 + gnu/usr.bin/binutils/ld/configure.tgt | 1 + gnu/usr.bin/binutils/ld/emulparams/elf32bmip.sh | 1 - gnu/usr.bin/binutils/ld/emulparams/elf32lmip.sh | 1 - 9 files changed, 17 insertions(+), 3 deletions(-) (limited to 'gnu/usr.bin/binutils') diff --git a/gnu/usr.bin/binutils/bfd/config.bfd b/gnu/usr.bin/binutils/bfd/config.bfd index 7d2814e9588..4d04f58d3af 100644 --- a/gnu/usr.bin/binutils/bfd/config.bfd +++ b/gnu/usr.bin/binutils/bfd/config.bfd @@ -334,6 +334,10 @@ case "${targ}" in targ_defvec=bfd_elf32_littlemips_vec targ_selvecs=bfd_elf32_bigmips_vec ;; + mips-arc-openbsd*) + targ_defvec=bfd_elf32_littlemips_vec + targ_selvecs=bfd_elf32_bigmips_vec + ;; mips*-dec-bsd*) targ_defvec=aout_mips_little_vec targ_underscore=yes diff --git a/gnu/usr.bin/binutils/bfd/elf.c b/gnu/usr.bin/binutils/bfd/elf.c index 57a46a39a62..49866631fca 100644 --- a/gnu/usr.bin/binutils/bfd/elf.c +++ b/gnu/usr.bin/binutils/bfd/elf.c @@ -847,6 +847,12 @@ bfd_section_from_shdr (abfd, shindex) if (! bfd_section_from_shdr (abfd, hdr->sh_info)) return false; + +/*XXX Why is sh_info sometimes (-static linked) zero? */ + if(hdr->sh_info == 0) + return true; +/*XXX*/ + target_sect = bfd_section_from_elf_index (abfd, hdr->sh_info); if (target_sect == NULL) return false; diff --git a/gnu/usr.bin/binutils/bfd/elf32-mips.c b/gnu/usr.bin/binutils/bfd/elf32-mips.c index 8500da3990b..62b9caef454 100644 --- a/gnu/usr.bin/binutils/bfd/elf32-mips.c +++ b/gnu/usr.bin/binutils/bfd/elf32-mips.c @@ -4416,7 +4416,7 @@ mips_elf_relocate_section (output_bfd, info, input_bfd, input_section, bfd_byte *cr; if ((info->shared - || (h != NULL + && (h != NULL && ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))) && (input_section->flags & SEC_ALLOC) != 0) diff --git a/gnu/usr.bin/binutils/config.guess b/gnu/usr.bin/binutils/config.guess index d9a7dfa5eaa..ddbdc4f3b05 100644 --- a/gnu/usr.bin/binutils/config.guess +++ b/gnu/usr.bin/binutils/config.guess @@ -70,6 +70,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in amiga:OpenBSD:*:*) echo m68k-cbm-openbsd${UNAME_RELEASE} exit 0 ;; + arc:OpenBSD:*:*) + echo mips-arc-openbsd${UNAME_RELEASE} + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; diff --git a/gnu/usr.bin/binutils/gas/configure b/gnu/usr.bin/binutils/gas/configure index 526e45887da..3317ec0a831 100644 --- a/gnu/usr.bin/binutils/gas/configure +++ b/gnu/usr.bin/binutils/gas/configure @@ -837,6 +837,7 @@ for this_target in $target $canon_targets ; do # don't change em like *-*-bsd does mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;; + mips-arc-openbsd*) fmt=elf targ=mips-lit endian=little ;; mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;; mips-dec-bsd*) fmt=aout targ=mips-lit ;; mips-sony-bsd*) fmt=ecoff targ=mips-big ;; diff --git a/gnu/usr.bin/binutils/gas/configure.in b/gnu/usr.bin/binutils/gas/configure.in index bc406691478..165c4ab68da 100644 --- a/gnu/usr.bin/binutils/gas/configure.in +++ b/gnu/usr.bin/binutils/gas/configure.in @@ -191,6 +191,7 @@ changequote([,])dnl # don't change em like *-*-bsd does mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;; + mips-arc-openbsd*) fmt=elf targ=mips-lit endian=little ;; mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;; mips-dec-bsd*) fmt=aout targ=mips-lit ;; mips-sony-bsd*) fmt=ecoff targ=mips-big ;; diff --git a/gnu/usr.bin/binutils/ld/configure.tgt b/gnu/usr.bin/binutils/ld/configure.tgt index add7bf03c41..df5b8f8ae95 100644 --- a/gnu/usr.bin/binutils/ld/configure.tgt +++ b/gnu/usr.bin/binutils/ld/configure.tgt @@ -114,6 +114,7 @@ mips*el-*-ecoff*) targ_emul=mipsidtl ;; mips*-*-ecoff*) targ_emul=mipsidt ;; mips*-dec-bsd*) targ_emul=mipsbsd ;; mips*-dec-netbsd*) targ_emul=elf32lmip ;; +mips*-arc-openbsd*) targ_emul=elf32lmip ;; mips*-dec-openbsd*) targ_emul=elf32lmip ;; mips*-*-bsd*) targ_emul=mipsbig ;; mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;; diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32bmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32bmip.sh index 3bc284e6d0c..2bcb2956450 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf32bmip.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32bmip.sh @@ -25,4 +25,3 @@ OTHER_SECTIONS=' ARCH=mips TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes -EMBEDDED=yes diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32lmip.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32lmip.sh index c892dc17cbb..4be75dd430e 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf32lmip.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32lmip.sh @@ -25,4 +25,3 @@ OTHER_SECTIONS=' ARCH=mips TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes -EMBEDDED=yes -- cgit v1.2.3