aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorUlf Carlsson <ulfc@engr.sgi.com>2000-07-02 01:18:49 +0000
committerUlf Carlsson <ulfc@engr.sgi.com>2000-07-02 01:18:49 +0000
commit8614eeee67f98b831035247ca1aa4b554e2586bb (patch)
treead9a758fdb3d3e6f0fbbe7394162f23f87005666 /gas/config
parentdd745cfae548d60e6e2d5bf544376ca3024c9b0d (diff)
downloadgdb-8614eeee67f98b831035247ca1aa4b554e2586bb.zip
gdb-8614eeee67f98b831035247ca1aa4b554e2586bb.tar.gz
gdb-8614eeee67f98b831035247ca1aa4b554e2586bb.tar.bz2
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.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-mips.c23
-rw-r--r--gas/config/te-tmips.h40
2 files changed, 63 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index a4d25bc..d8f593f 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -121,9 +121,15 @@ mips_target_format ()
case bfd_target_coff_flavour:
return "pe-mips";
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
? (mips_64 ? "elf64-bigmips" : "elf32-bigmips")
: (mips_64 ? "elf64-littlemips" : "elf32-littlemips"));
+#endif
default:
abort ();
return NULL;
@@ -10988,6 +10994,7 @@ md_estimate_size_before_relax (fragp, segtype)
asection *segtype;
{
int change = 0;
+ boolean linkonce = false;
if (RELAX_MIPS16_P (fragp->fr_subtype))
{
@@ -11030,10 +11037,26 @@ md_estimate_size_before_relax (fragp, segtype)
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. */
change = (symsec != &bfd_und_section
&& symsec != &bfd_abs_section
&& ! bfd_is_com_section (symsec)
+ && !linkonce
#ifdef OBJ_ELF
/* A weak symbol is treated as external. */
&& ! S_IS_WEAK (sym)
diff --git a/gas/config/te-tmips.h b/gas/config/te-tmips.h
new file mode 100644
index 0000000..eedebd5
--- /dev/null
+++ b/gas/config/te-tmips.h
@@ -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