2000-07-01 Koundinya K <kk@ddeorg.soft.net>
* configure.in: Add entry for mips-*-sysv4*MP* * configure: Rebuild * config/tc-mips.c (mips_target_format): Return elf32-tradbigmips or elf32-tradlittlemips for traditional mips targets. * config/tc-mips.c (md_estimate_size_before_relax): Duplicate the test for Link Once sections as in adjust_reloc_syms. * config/te-tmips.h: New file for traditional mips targets. Define TE_TMIPS.
This commit is contained in:
parent
dd745cfae5
commit
8614eeee67
@ -121,9 +121,15 @@ mips_target_format ()
|
|||||||
case bfd_target_coff_flavour:
|
case bfd_target_coff_flavour:
|
||||||
return "pe-mips";
|
return "pe-mips";
|
||||||
case bfd_target_elf_flavour:
|
case bfd_target_elf_flavour:
|
||||||
|
#ifdef TE_TMIPS
|
||||||
|
/* This is traditional mips */
|
||||||
|
return (target_big_endian
|
||||||
|
? "elf32-tradbigmips" : "elf32-tradlittlemips");
|
||||||
|
#else
|
||||||
return (target_big_endian
|
return (target_big_endian
|
||||||
? (mips_64 ? "elf64-bigmips" : "elf32-bigmips")
|
? (mips_64 ? "elf64-bigmips" : "elf32-bigmips")
|
||||||
: (mips_64 ? "elf64-littlemips" : "elf32-littlemips"));
|
: (mips_64 ? "elf64-littlemips" : "elf32-littlemips"));
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
abort ();
|
abort ();
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -10988,6 +10994,7 @@ md_estimate_size_before_relax (fragp, segtype)
|
|||||||
asection *segtype;
|
asection *segtype;
|
||||||
{
|
{
|
||||||
int change = 0;
|
int change = 0;
|
||||||
|
boolean linkonce = false;
|
||||||
|
|
||||||
if (RELAX_MIPS16_P (fragp->fr_subtype))
|
if (RELAX_MIPS16_P (fragp->fr_subtype))
|
||||||
{
|
{
|
||||||
@ -11030,10 +11037,26 @@ md_estimate_size_before_relax (fragp, segtype)
|
|||||||
|
|
||||||
symsec = S_GET_SEGMENT (sym);
|
symsec = S_GET_SEGMENT (sym);
|
||||||
|
|
||||||
|
/* duplicate the test for LINK_ONCE sections as in adjust_reloc_syms */
|
||||||
|
if (symsec != segtype && ! S_IS_LOCAL (sym))
|
||||||
|
{
|
||||||
|
if ((bfd_get_section_flags (stdoutput, symsec) & SEC_LINK_ONCE)
|
||||||
|
!= 0)
|
||||||
|
linkonce = true;
|
||||||
|
|
||||||
|
/* The GNU toolchain uses an extension for ELF: a section
|
||||||
|
beginning with the magic string .gnu.linkonce is a linkonce
|
||||||
|
section. */
|
||||||
|
if (strncmp (segment_name (symsec), ".gnu.linkonce",
|
||||||
|
sizeof ".gnu.linkonce" - 1) == 0)
|
||||||
|
linkonce = true;
|
||||||
|
}
|
||||||
|
|
||||||
/* This must duplicate the test in adjust_reloc_syms. */
|
/* This must duplicate the test in adjust_reloc_syms. */
|
||||||
change = (symsec != &bfd_und_section
|
change = (symsec != &bfd_und_section
|
||||||
&& symsec != &bfd_abs_section
|
&& symsec != &bfd_abs_section
|
||||||
&& ! bfd_is_com_section (symsec)
|
&& ! bfd_is_com_section (symsec)
|
||||||
|
&& !linkonce
|
||||||
#ifdef OBJ_ELF
|
#ifdef OBJ_ELF
|
||||||
/* A weak symbol is treated as external. */
|
/* A weak symbol is treated as external. */
|
||||||
&& ! S_IS_WEAK (sym)
|
&& ! S_IS_WEAK (sym)
|
||||||
|
40
gas/config/te-tmips.h
Normal file
40
gas/config/te-tmips.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/* Traditional MIPS targets
|
||||||
|
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GAS, the GNU Assembler.
|
||||||
|
|
||||||
|
GAS is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GAS is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GAS; see the file COPYING. If not, write to the Free
|
||||||
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
02111-1307, USA. */
|
||||||
|
|
||||||
|
/* This file is te-tmips.h and is intended to provide support for
|
||||||
|
traditional mips targets like mips-dde-sysv4.2MP (Supermax ) ,
|
||||||
|
mips-sni-sysv4* (Sinix) etc. The base for this file is te-generic.h.
|
||||||
|
Created by Koundinya.K < kk@ddeorg.soft.net > with the help of
|
||||||
|
Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>. */
|
||||||
|
|
||||||
|
/* Added these, because if we don't know what we're targetting we may
|
||||||
|
need an assembler version of libgcc, and that will use local
|
||||||
|
labels. */
|
||||||
|
|
||||||
|
#define TE_TMIPS 1
|
||||||
|
#define LOCAL_LABELS_DOLLAR 1
|
||||||
|
#define LOCAL_LABELS_FB 1
|
||||||
|
|
||||||
|
/* these define interfaces */
|
||||||
|
#ifdef OBJ_HEADER
|
||||||
|
#include OBJ_HEADER
|
||||||
|
#else
|
||||||
|
#include "obj-format.h"
|
||||||
|
#endif
|
364
gas/configure
vendored
364
gas/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -319,6 +319,11 @@ changequote([,])dnl
|
|||||||
mips-*-irix*) fmt=ecoff ;;
|
mips-*-irix*) fmt=ecoff ;;
|
||||||
mips-*-lnews*) fmt=ecoff em=lnews ;;
|
mips-*-lnews*) fmt=ecoff em=lnews ;;
|
||||||
mips-*-riscos*) fmt=ecoff ;;
|
mips-*-riscos*) fmt=ecoff ;;
|
||||||
|
mips-*-sysv4*MP*) if test -d /usr/dde; then
|
||||||
|
fmt=elf
|
||||||
|
em=tmips
|
||||||
|
fi
|
||||||
|
;;
|
||||||
mips-*-sysv*) fmt=ecoff ;;
|
mips-*-sysv*) fmt=ecoff ;;
|
||||||
mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
|
mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
|
||||||
fmt=elf ;;
|
fmt=elf ;;
|
||||||
@ -562,6 +567,10 @@ changequote([,])dnl
|
|||||||
big) emulation="mipsbelf mipslelf mipself" ;;
|
big) emulation="mipsbelf mipslelf mipself" ;;
|
||||||
*) emulation="mipslelf mipsbelf mipself" ;;
|
*) emulation="mipslelf mipsbelf mipself" ;;
|
||||||
esac ;;
|
esac ;;
|
||||||
|
mips-*-sysv4*MP*-*) if test -d /usr/dde; then
|
||||||
|
emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
# i386-pc-pe-coff != i386-pc-coff.
|
# i386-pc-pe-coff != i386-pc-coff.
|
||||||
i386-*-pe-coff) ;;
|
i386-*-pe-coff) ;;
|
||||||
# Uncommenting the next line will turn on support for i386 AOUT
|
# Uncommenting the next line will turn on support for i386 AOUT
|
||||||
@ -723,6 +732,11 @@ if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
|
|||||||
# USE_EMULATIONS or include any of the e-files as they will only be bloat.
|
# USE_EMULATIONS or include any of the e-files as they will only be bloat.
|
||||||
case "${obj_format}${emfiles}" in
|
case "${obj_format}${emfiles}" in
|
||||||
multi* | *mips*)
|
multi* | *mips*)
|
||||||
|
# if te_file is tmips, that means the target is mips-*-sysv4*MP* and we do
|
||||||
|
# not set it to multi.
|
||||||
|
if [[ $te_file -ne "tmips" ]]; then
|
||||||
|
te_file=multi
|
||||||
|
fi
|
||||||
extra_objects="$extra_objects $emfiles"
|
extra_objects="$extra_objects $emfiles"
|
||||||
AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;;
|
AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user