aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-04-16 15:33:26 +0930
committerAlan Modra <amodra@gmail.com>2018-04-16 15:33:26 +0930
commitc9098af41e3246586a30f4f0bdb0ee4367e9a5e7 (patch)
tree8e9536dd5e0e1227e0e311b811d029dba4e14b3f /gas
parentdc12032bca08554cf0a72d224e44f755f7789ff3 (diff)
downloadgdb-c9098af41e3246586a30f4f0bdb0ee4367e9a5e7.zip
gdb-c9098af41e3246586a30f4f0bdb0ee4367e9a5e7.tar.gz
gdb-c9098af41e3246586a30f4f0bdb0ee4367e9a5e7.tar.bz2
Remove sparc-aout and sparc-coff support
bfd/ * Makefile.am: Remove sparc-aout and sparc-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-sparcle.c: Delete. * aoutf1.h: Delete. * cf-sparclynx.c: Delete. * coff-sparc.c: Delete. * demo64.c: Delete. * sparclinux.c: Delete. * sparclynx.c: Delete. * sparcnetbsd.c: Delete. * sunos.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. binutils/ * testsuite/lib/binutils-common.exp: Remove sparc-aout and sparc-coff support. gas/ * Makefile.am: Remove sparc-aout and sparc-coff support. * config/obj-coff.h: Likewise. * config/tc-sparc.c: Likewise. * config/tc-sparc.h: Likewise. * configure.tgt: Likewise. * config/te-sparcaout.h: Delete. * testsuite/gas/sun4/addend.d: Delete. * testsuite/gas/sun4/addend.exp: Delete. * testsuite/gas/sun4/addend.s: Delete. * Makefile.in: Regenerate. * po/POTFILES.in: Regenerate. ld/ * Makefile.am: Remove sparc-aout and sparc-coff support. * configure.tgt: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * emulparams/coff_sparc.sh: Delete. * emulparams/sparcaout.sh: Delete. * emulparams/sparclinux.sh: Delete. * emulparams/sparcnbsd.sh: Delete. * emulparams/sun4.sh: Delete. * scripttempl/sparccoff.sc: Delete. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog14
-rw-r--r--gas/Makefile.am1
-rw-r--r--gas/Makefile.in1
-rw-r--r--gas/config/obj-coff.h4
-rw-r--r--gas/config/tc-sparc.c200
-rw-r--r--gas/config/tc-sparc.h44
-rw-r--r--gas/config/te-sparcaout.h22
-rw-r--r--gas/configure.tgt21
-rw-r--r--gas/po/POTFILES.in1
-rw-r--r--gas/testsuite/gas/sun4/addend.d13
-rw-r--r--gas/testsuite/gas/sun4/addend.exp23
-rw-r--r--gas/testsuite/gas/sun4/addend.s11
12 files changed, 21 insertions, 334 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 20e9114..e837e5c 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,19 @@
2018-04-16 Alan Modra <amodra@gmail.com>
+ * Makefile.am: Remove sparc-aout and sparc-coff support.
+ * config/obj-coff.h: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-sparc.h: Likewise.
+ * configure.tgt: Likewise.
+ * config/te-sparcaout.h: Delete.
+ * testsuite/gas/sun4/addend.d: Delete.
+ * testsuite/gas/sun4/addend.exp: Delete.
+ * testsuite/gas/sun4/addend.s: Delete.
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2018-04-16 Alan Modra <amodra@gmail.com>
+
* Makefile.am: Remove m68k-aout and m68k-coff support.
* config/tc-m68k.c: Likewise.
* config/tc-m68k.h: Likewise.
diff --git a/gas/Makefile.am b/gas/Makefile.am
index a3354bd..ce4dfd7 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -327,7 +327,6 @@ TARG_ENV_HFILES = \
config/te-pe.h \
config/te-riscix.h \
config/te-solaris.h \
- config/te-sparcaout.h \
config/te-svr4.h \
config/te-symbian.h \
config/te-tmips.h \
diff --git a/gas/Makefile.in b/gas/Makefile.in
index bf176cc..45dca93 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -623,7 +623,6 @@ TARG_ENV_HFILES = \
config/te-pe.h \
config/te-riscix.h \
config/te-solaris.h \
- config/te-sparcaout.h \
config/te-svr4.h \
config/te-symbian.h \
config/te-tmips.h \
diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h
index e3013ab..b91e18b 100644
--- a/gas/config/obj-coff.h
+++ b/gas/config/obj-coff.h
@@ -48,10 +48,6 @@
#endif
#endif
-#ifdef TC_SPARC
-#include "coff/sparc.h"
-#endif
-
#ifdef TC_I386
#ifdef TE_PEP
#include "coff/x86_64.h"
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 1994452..a0118be 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -24,10 +24,8 @@
#include "opcode/sparc.h"
#include "dw2gencfi.h"
-#ifdef OBJ_ELF
#include "elf/sparc.h"
#include "dwarf2dbg.h"
-#endif
/* Some ancient Sun C compilers would not take such hex constants as
unsigned, and would end up sign-extending them to form an offsetT,
@@ -70,7 +68,6 @@ static int sparc_arch_size;
changes the value before md_show_usage is called. */
static int default_arch_size;
-#ifdef OBJ_ELF
/* The currently selected v9 memory model. Currently only used for
ELF. */
static enum { MM_TSO, MM_PSO, MM_RMO } sparc_memory_model = MM_RMO;
@@ -80,7 +77,6 @@ static enum { MM_TSO, MM_PSO, MM_RMO } sparc_memory_model = MM_RMO;
GNU attributes section with hwcap information. */
static bfd_uint64_t hwcap_seen;
#endif
-#endif
static bfd_uint64_t hwcap_allowed;
@@ -140,9 +136,7 @@ static void s_common (int);
static void s_empty (int);
static void s_uacons (int);
static void s_ncons (int);
-#ifdef OBJ_ELF
static void s_register (int);
-#endif
const pseudo_typeS md_pseudo_table[] =
{
@@ -162,13 +156,11 @@ const pseudo_typeS md_pseudo_table[] =
{"uahalf", s_uacons, 2},
{"uaword", s_uacons, 4},
{"uaxword", s_uacons, 8},
-#ifdef OBJ_ELF
/* These are specific to sparc/svr4. */
{"2byte", s_uacons, 2},
{"4byte", s_uacons, 4},
{"8byte", s_uacons, 8},
{"register", s_register, 0},
-#endif
{NULL, 0, 0},
};
@@ -348,40 +340,11 @@ sparc_target_format (void)
if (! default_init_p)
init_default_arch ();
-#ifdef OBJ_AOUT
-#ifdef TE_NetBSD
- return "a.out-sparc-netbsd";
-#else
-#ifdef TE_SPARCAOUT
- if (target_big_endian)
- return "a.out-sunos-big";
- else if (default_arch_type == sparc86x && target_little_endian_data)
- return "a.out-sunos-big";
- else
- return "a.out-sparc-little";
-#else
- return "a.out-sunos-big";
-#endif
-#endif
-#endif
-
-#ifdef OBJ_COFF
-#ifdef TE_LYNX
- return "coff-sparc-lynx";
-#else
- return "coff-sparc";
-#endif
-#endif
-
#ifdef TE_VXWORKS
return "elf32-sparc-vxworks";
#endif
-#ifdef OBJ_ELF
return sparc_arch_size == 64 ? ELF64_TARGET_FORMAT : ELF_TARGET_FORMAT;
-#endif
-
- abort ();
}
/* md_parse_option
@@ -438,15 +401,7 @@ sparc_target_format (void)
* error. For example, from sparclite to v9.
*/
-#ifdef OBJ_ELF
const char *md_shortopts = "A:K:VQ:sq";
-#else
-#ifdef OBJ_AOUT
-const char *md_shortopts = "A:k";
-#else
-const char *md_shortopts = "A:";
-#endif
-#endif
struct option md_longopts[] = {
#define OPTION_BUMP (OPTION_MD_BASE)
{"bump", no_argument, NULL, OPTION_BUMP},
@@ -454,7 +409,6 @@ struct option md_longopts[] = {
{"sparc", no_argument, NULL, OPTION_SPARC},
#define OPTION_XARCH (OPTION_MD_BASE + 2)
{"xarch", required_argument, NULL, OPTION_XARCH},
-#ifdef OBJ_ELF
#define OPTION_32 (OPTION_MD_BASE + 3)
{"32", no_argument, NULL, OPTION_32},
#define OPTION_64 (OPTION_MD_BASE + 4)
@@ -465,7 +419,6 @@ struct option md_longopts[] = {
{"PSO", no_argument, NULL, OPTION_PSO},
#define OPTION_RMO (OPTION_MD_BASE + 7)
{"RMO", no_argument, NULL, OPTION_RMO},
-#endif
#ifdef SPARC_BIENDIAN
#define OPTION_LITTLE_ENDIAN (OPTION_MD_BASE + 8)
{"EL", no_argument, NULL, OPTION_LITTLE_ENDIAN},
@@ -476,12 +429,10 @@ struct option md_longopts[] = {
{"enforce-aligned-data", no_argument, NULL, OPTION_ENFORCE_ALIGNED_DATA},
#define OPTION_LITTLE_ENDIAN_DATA (OPTION_MD_BASE + 11)
{"little-endian-data", no_argument, NULL, OPTION_LITTLE_ENDIAN_DATA},
-#ifdef OBJ_ELF
#define OPTION_NO_UNDECLARED_REGS (OPTION_MD_BASE + 12)
{"no-undeclared-regs", no_argument, NULL, OPTION_NO_UNDECLARED_REGS},
#define OPTION_UNDECLARED_REGS (OPTION_MD_BASE + 13)
{"undeclared-regs", no_argument, NULL, OPTION_UNDECLARED_REGS},
-#endif
#define OPTION_RELAX (OPTION_MD_BASE + 14)
{"relax", no_argument, NULL, OPTION_RELAX},
#define OPTION_NO_RELAX (OPTION_MD_BASE + 15)
@@ -509,7 +460,6 @@ md_parse_option (int c, const char *arg)
break;
case OPTION_XARCH:
-#ifdef OBJ_ELF
if (!strncmp (arg, "v9", 2))
md_parse_option (OPTION_64, NULL);
else
@@ -522,7 +472,6 @@ md_parse_option (int c, const char *arg)
|| !strcmp (arg, "sparc86x"))
md_parse_option (OPTION_32, NULL);
}
-#endif
/* Fall through. */
case 'A':
@@ -588,13 +537,6 @@ md_parse_option (int c, const char *arg)
break;
#endif
-#ifdef OBJ_AOUT
- case 'k':
- sparc_pic_code = 1;
- break;
-#endif
-
-#ifdef OBJ_ELF
case OPTION_32:
case OPTION_64:
{
@@ -669,7 +611,6 @@ md_parse_option (int c, const char *arg)
case OPTION_UNDECLARED_REGS:
no_undeclared_regs = 0;
break;
-#endif
case OPTION_RELAX:
sparc_relax = 1;
@@ -737,11 +678,6 @@ md_show_usage (FILE *stream)
--enforce-aligned-data force .long, etc., to be aligned correctly\n\
-relax relax jumps and branches (default)\n\
-no-relax avoid changing any jumps and branches\n"));
-#ifdef OBJ_AOUT
- fprintf (stream, _("\
--k generate PIC\n"));
-#endif
-#ifdef OBJ_ELF
fprintf (stream, _("\
-32 create 32 bit object file\n\
-64 create 64 bit object file\n"));
@@ -764,7 +700,6 @@ md_show_usage (FILE *stream)
-q ignored\n\
-Qy, -Qn ignored\n\
-s ignored\n"));
-#endif
#ifdef SPARC_BIENDIAN
fprintf (stream, _("\
-EL generate code for a little endian machine\n\
@@ -1158,7 +1093,7 @@ void
sparc_md_end (void)
{
unsigned long mach;
-#if defined(OBJ_ELF) && !defined(TE_SOLARIS)
+#ifndef TE_SOLARIS
int hwcaps, hwcaps2;
#endif
@@ -1195,7 +1130,7 @@ sparc_md_end (void)
}
bfd_set_arch_mach (stdoutput, bfd_arch_sparc, mach);
-#if defined(OBJ_ELF) && !defined(TE_SOLARIS)
+#ifndef TE_SOLARIS
hwcaps = hwcap_seen & U0xffffffff;
hwcaps2 = hwcap_seen >> 32;
@@ -3247,7 +3182,7 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn)
bfd_uint64_t hwcaps
= (((bfd_uint64_t) insn->hwcaps2) << 32) | insn->hwcaps;
-#if defined(OBJ_ELF) && !defined(TE_SOLARIS)
+#ifndef TE_SOLARIS
if (hwcaps)
hwcap_seen |= hwcaps;
#endif
@@ -3490,9 +3425,7 @@ output_insn (const struct sparc_opcode *insn, struct sparc_it *theinsn)
last_insn = insn;
last_opcode = theinsn->opcode;
-#ifdef OBJ_ELF
dwarf2_emit_insn (4);
-#endif
}
const char *
@@ -3532,7 +3465,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT segment ATTRIBUTE_UNUSED)
fixP->fx_addnumber = val; /* Remember value for emit_reloc. */
-#ifdef OBJ_ELF
/* SPARC ELF relocations don't use an addend in the data field. */
if (fixP->fx_addsy != NULL)
{
@@ -3570,7 +3502,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT segment ATTRIBUTE_UNUSED)
return;
}
-#endif
/* This is a hack. There should be a better way to
handle this. Probably in terms of howto fields, once
@@ -3578,45 +3509,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT segment ATTRIBUTE_UNUSED)
if (fixP->fx_r_type == BFD_RELOC_32_PCREL_S2 && fixP->fx_addsy)
val += fixP->fx_where + fixP->fx_frag->fr_address;
-#ifdef OBJ_AOUT
- /* FIXME: More ridiculous gas reloc hacking. If we are going to
- generate a reloc, then we just want to let the reloc addend set
- the value. We do not want to also stuff the addend into the
- object file. Including the addend in the object file works when
- doing a static link, because the linker will ignore the object
- file contents. However, the dynamic linker does not ignore the
- object file contents. */
- if (fixP->fx_addsy != NULL
- && fixP->fx_r_type != BFD_RELOC_32_PCREL_S2)
- val = 0;
-
- /* When generating PIC code, we do not want an addend for a reloc
- against a local symbol. We adjust fx_addnumber to cancel out the
- value already included in val, and to also cancel out the
- adjustment which bfd_install_relocation will create. */
- if (sparc_pic_code
- && fixP->fx_r_type != BFD_RELOC_32_PCREL_S2
- && fixP->fx_addsy != NULL
- && ! S_IS_COMMON (fixP->fx_addsy)
- && symbol_section_p (fixP->fx_addsy))
- fixP->fx_addnumber -= 2 * S_GET_VALUE (fixP->fx_addsy);
-
- /* When generating PIC code, we need to fiddle to get
- bfd_install_relocation to do the right thing for a PC relative
- reloc against a local symbol which we are going to keep. */
- if (sparc_pic_code
- && fixP->fx_r_type == BFD_RELOC_32_PCREL_S2
- && fixP->fx_addsy != NULL
- && (S_IS_EXTERNAL (fixP->fx_addsy)
- || S_IS_WEAK (fixP->fx_addsy))
- && S_IS_DEFINED (fixP->fx_addsy)
- && ! S_IS_COMMON (fixP->fx_addsy))
- {
- val = 0;
- fixP->fx_addnumber -= 2 * S_GET_VALUE (fixP->fx_addsy);
- }
-#endif
-
/* If this is a data relocation, just output VAL. */
if (fixP->fx_r_type == BFD_RELOC_8)
@@ -4054,21 +3946,16 @@ tc_gen_reloc (asection *section, fixS *fixp)
return NULL;
}
-#if defined (OBJ_ELF) || defined (OBJ_AOUT)
/* If we are generating PIC code, we need to generate a different
set of relocs. */
-#ifdef OBJ_ELF
#define GOT_NAME "_GLOBAL_OFFSET_TABLE_"
-#else
-#define GOT_NAME "__GLOBAL_OFFSET_TABLE_"
-#endif
#ifdef TE_VXWORKS
#define GOTT_BASE "__GOTT_BASE__"
#define GOTT_INDEX "__GOTT_INDEX__"
#endif
- /* This code must be parallel to the OBJ_ELF tc_fix_adjustable. */
+ /* This code must be parallel to tc_fix_adjustable. */
if (sparc_pic_code)
{
@@ -4111,7 +3998,6 @@ tc_gen_reloc (asection *section, fixS *fixp)
break;
}
}
-#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */
/* Nothing is aligned in DWARF debugging sections. */
if (bfd_get_section_flags (stdoutput, section) & SEC_DEBUGGING)
@@ -4138,25 +4024,6 @@ tc_gen_reloc (asection *section, fixS *fixp)
}
/* @@ Why fx_addnumber sometimes and fx_offset other times? */
-#ifdef OBJ_AOUT
-
- if (reloc->howto->pc_relative == 0
- || code == BFD_RELOC_SPARC_PC10
- || code == BFD_RELOC_SPARC_PC22)
- reloc->addend = fixp->fx_addnumber;
- else if (sparc_pic_code
- && fixp->fx_r_type == BFD_RELOC_32_PCREL_S2
- && fixp->fx_addsy != NULL
- && (S_IS_EXTERNAL (fixp->fx_addsy)
- || S_IS_WEAK (fixp->fx_addsy))
- && S_IS_DEFINED (fixp->fx_addsy)
- && ! S_IS_COMMON (fixp->fx_addsy))
- reloc->addend = fixp->fx_addnumber;
- else
- reloc->addend = fixp->fx_offset - reloc->address;
-
-#else /* elf or coff */
-
if (code != BFD_RELOC_32_PCREL_S2
&& code != BFD_RELOC_SPARC_WDISP22
&& code != BFD_RELOC_SPARC_WDISP16
@@ -4172,7 +4039,6 @@ tc_gen_reloc (asection *section, fixS *fixp)
+ md_pcrel_from (fixp));
else
reloc->addend = fixp->fx_offset;
-#endif
/* We expand R_SPARC_OLO10 to R_SPARC_LO10 and R_SPARC_13
on the same location. */
@@ -4205,20 +4071,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
valueT
md_section_align (segT segment ATTRIBUTE_UNUSED, valueT size)
{
-#ifndef OBJ_ELF
- /* This is not right for ELF; a.out wants it, and COFF will force
- the alignment anyways. */
- valueT align = ((valueT) 1
- << (valueT) bfd_get_section_alignment (stdoutput, segment));
- valueT newsize;
-
- /* Turn alignment value into a mask. */
- align--;
- newsize = (size + align) & ~align;
- return newsize;
-#else
return size;
-#endif
}
/* Exactly what point is a PC-relative offset relative TO?
@@ -4257,10 +4110,6 @@ mylog2 (int value)
/* Sort of like s_lcomm. */
-#ifndef OBJ_ELF
-static int max_alignment = 15;
-#endif
-
static void
s_reserve (int ignore ATTRIBUTE_UNUSED)
{
@@ -4324,14 +4173,6 @@ s_reserve (int ignore ATTRIBUTE_UNUSED)
align = (int) get_absolute_expression ();
-#ifndef OBJ_ELF
- if (align > max_alignment)
- {
- align = max_alignment;
- as_warn (_("alignment too large; assuming %d"), align);
- }
-#endif
-
if (align < 0)
{
as_bad (_("negative alignment"));
@@ -4357,12 +4198,7 @@ s_reserve (int ignore ATTRIBUTE_UNUSED)
else
align = 0;
- if (!S_IS_DEFINED (symbolP)
-#ifdef OBJ_AOUT
- && S_GET_OTHER (symbolP) == 0
- && S_GET_DESC (symbolP) == 0
-#endif
- )
+ if (!S_IS_DEFINED (symbolP))
{
if (! need_pass_2)
{
@@ -4390,9 +4226,7 @@ s_reserve (int ignore ATTRIBUTE_UNUSED)
subseg_set (current_seg, current_subseg);
-#ifdef OBJ_ELF
S_SET_SIZE (symbolP, size);
-#endif
}
}
else
@@ -4453,13 +4287,6 @@ s_common (int ignore ATTRIBUTE_UNUSED)
S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), (long) size);
}
}
- else
- {
-#ifndef OBJ_ELF
- S_SET_VALUE (symbolP, (valueT) size);
- S_SET_EXTERNAL (symbolP);
-#endif
- }
know (symbol_get_frag (symbolP) == &zero_address_frag);
if (*input_line_pointer != ',')
{
@@ -4473,14 +4300,6 @@ s_common (int ignore ATTRIBUTE_UNUSED)
{
temp = get_absolute_expression ();
-#ifndef OBJ_ELF
- if (temp > max_alignment)
- {
- temp = max_alignment;
- as_warn (_("alignment too large; assuming %ld"), (long) temp);
- }
-#endif
-
if (temp < 0)
{
as_bad (_("negative alignment"));
@@ -4488,7 +4307,6 @@ s_common (int ignore ATTRIBUTE_UNUSED)
return;
}
-#ifdef OBJ_ELF
if (symbol_get_obj (symbolP)->local)
{
segT old_sec;
@@ -4526,14 +4344,11 @@ s_common (int ignore ATTRIBUTE_UNUSED)
subseg_set (old_sec, old_subsec);
}
else
-#endif /* OBJ_ELF */
{
allocate_common:
S_SET_VALUE (symbolP, (valueT) size);
-#ifdef OBJ_ELF
S_SET_ALIGN (symbolP, temp);
S_SET_SIZE (symbolP, size);
-#endif
S_SET_EXTERNAL (symbolP);
S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
}
@@ -4669,7 +4484,6 @@ s_ncons (int bytes ATTRIBUTE_UNUSED)
cons (sparc_arch_size == 32 ? 4 : 8);
}
-#ifdef OBJ_ELF
/* Handle the SPARC ELF .register pseudo-op. This sets the binding of a
global register.
The syntax is:
@@ -4782,7 +4596,6 @@ sparc_adjust_symtab (void)
S_SET_SEGMENT (sym, undefined_section);
}
}
-#endif
/* If the --enforce-aligned-data option is used, we require .word,
et. al., to be aligned correctly. We do it by setting up an
@@ -4882,7 +4695,6 @@ sparc_handle_align (fragS *fragp)
}
}
-#ifdef OBJ_ELF
/* Some special processing for a Sparc ELF file. */
void
@@ -5048,8 +4860,6 @@ sparc_cons (expressionS *exp, int size)
return sparc_cons_special_reloc;
}
-#endif
-
/* This is called by emit_expr via TC_CONS_FIX_NEW when creating a
reloc for a cons. We could use the definition there, except that
we want to handle little endian relocs specially. */
diff --git a/gas/config/tc-sparc.h b/gas/config/tc-sparc.h
index e3db1fb..d4d9f8c 100644
--- a/gas/config/tc-sparc.h
+++ b/gas/config/tc-sparc.h
@@ -82,29 +82,6 @@ extern void sparc_handle_align (struct frag *);
#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
-/* I know that "call 0" fails in sparc-coff if this doesn't return 1. I
- don't know about other relocation types, or other formats, yet. */
-#ifdef OBJ_COFF
-#define TC_FORCE_RELOCATION_ABS(FIX) \
- ((FIX)->fx_r_type == BFD_RELOC_32_PCREL_S2 \
- || TC_FORCE_RELOCATION (FIX))
-
-#define RELOC_REQUIRES_SYMBOL
-#endif
-
-#ifdef OBJ_AOUT
-/* This expression evaluates to true if the relocation is for a local
- object for which we still want to do the relocation at runtime.
- False if we are willing to perform this relocation while building
- the .o file. */
-
-#define TC_FORCE_RELOCATION_LOCAL(FIX) \
- (GENERIC_FORCE_RELOCATION_LOCAL (FIX) \
- || (sparc_pic_code \
- && S_IS_EXTERNAL ((FIX)->fx_addsy)))
-#endif
-
-#ifdef OBJ_ELF
/* Don't turn certain relocs into relocations against sections. This
is required for the dynamic linker to operate properly. When
generating PIC, we need to keep any non PC relative reloc. The PIC
@@ -142,21 +119,6 @@ extern void sparc_adjust_symtab (void);
|| (FIX)->fx_r_type == BFD_RELOC_32 \
|| (FIX)->fx_r_type == BFD_RELOC_16 \
|| (FIX)->fx_r_type == BFD_RELOC_8))
-#endif
-
-#ifdef OBJ_AOUT
-/* When generating PIC code, we must not adjust any reloc which will
- turn into a reloc against the global offset table, nor any reloc
- which we will need if a symbol is overridden. */
-#define tc_fix_adjustable(FIX) \
- (! sparc_pic_code \
- || ((FIX)->fx_pcrel \
- && ((FIX)->fx_addsy == NULL \
- || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
- && ! S_IS_WEAK ((FIX)->fx_addsy)))) \
- || (FIX)->fx_r_type == BFD_RELOC_16 \
- || (FIX)->fx_r_type == BFD_RELOC_32)
-#endif
#define elf_tc_final_processing sparc_elf_final_processing
extern void sparc_elf_final_processing (void);
@@ -166,15 +128,11 @@ extern void sparc_elf_final_processing (void);
extern void sparc_md_end (void);
#define md_end() sparc_md_end ()
-#endif
-
#define TC_PARSE_CONS_RETURN_TYPE const char *
#define TC_PARSE_CONS_RETURN_NONE NULL
-#ifdef OBJ_ELF
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) sparc_cons (EXP, NBYTES)
extern const char *sparc_cons (expressionS *, int);
-#endif
#define TC_CONS_FIX_NEW cons_fix_new_sparc
extern void cons_fix_new_sparc
@@ -220,4 +178,4 @@ extern int sparc_cie_data_alignment;
this, BFD_RELOC_32_PCREL will be emitted directly instead. */
#define CFI_DIFF_EXPR_OK 0
-/* end of tc-sparc.h */
+#endif
diff --git a/gas/config/te-sparcaout.h b/gas/config/te-sparcaout.h
deleted file mode 100644
index 1f7ecbd..0000000
--- a/gas/config/te-sparcaout.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* te-sparcaout.h -- embedded sparc-aout target environment declarations.
- Copyright (C) 1996-2018 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 3, 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, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#define TE_SPARCAOUT 1
-#include "obj-format.h"
diff --git a/gas/configure.tgt b/gas/configure.tgt
index c0412fa..ad2bbe2 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -412,28 +412,9 @@ case ${generic_target} in
sh-*-kaos*) fmt=elf ;;
shle*-*-kaos*) fmt=elf ;;
- sparc-*-sunos4*) fmt=aout em=sun3 ;;
- sparc-*-aout) fmt=aout em=sparcaout ;;
- sparc-*-coff) fmt=coff ;;
- sparc-*-linux*aout*) fmt=aout em=linux ;;
sparc-*-linux-*) fmt=elf em=linux ;;
- sparc-fujitsu-none) fmt=aout ;;
- sparc-*-elf) fmt=elf ;;
- sparc-*-sysv4*) fmt=elf ;;
sparc-*-solaris*) fmt=elf em=solaris ;;
- sparc-*-netbsdelf*) fmt=elf em=nbsd ;;
- sparc-*-netbsd*)
- case ${cpu} in
- sparc64) fmt=elf em=nbsd ;;
- *) fmt=aout em=nbsd ;;
- esac ;;
- sparc-*-openbsd[0-2].* | \
- sparc-*-openbsd3.[0-1])
- case ${cpu} in
- sparc64) fmt=elf em=nbsd ;;
- *) fmt=aout em=nbsd ;;
- esac ;;
- sparc-*-openbsd*) fmt=elf em=nbsd ;;
+ sparc-*-*bsd*) fmt=elf em=nbsd ;;
spu-*-elf) fmt=elf ;;
diff --git a/gas/po/POTFILES.in b/gas/po/POTFILES.in
index 5ee1ff7..139d955 100644
--- a/gas/po/POTFILES.in
+++ b/gas/po/POTFILES.in
@@ -202,7 +202,6 @@ config/te-pc532mach.h
config/te-pe.h
config/te-riscix.h
config/te-solaris.h
-config/te-sparcaout.h
config/te-svr4.h
config/te-symbian.h
config/te-tmips.h
diff --git a/gas/testsuite/gas/sun4/addend.d b/gas/testsuite/gas/sun4/addend.d
deleted file mode 100644
index 50ff458..0000000
--- a/gas/testsuite/gas/sun4/addend.d
+++ /dev/null
@@ -1,13 +0,0 @@
-#objdump: -r
-# name : addends
-.*: +file format a.out-sunos-big
-
-RELOCATION RECORDS FOR \[.text\]:
-OFFSET TYPE +VALUE
-0+08 WDISP22 +foo1\+0xf+fc
-0+0c WDISP22 +foo1\+0xf+f8
-0+10 WDISP22 +foo1\+0xf+f0
-0+14 WDISP22 +foo1\+0xf+ec
-0+1c 32 +foo1
-0+20 32 +foo1\+0x0+4
-#0+20 32 +foo1\+0x0+4
diff --git a/gas/testsuite/gas/sun4/addend.exp b/gas/testsuite/gas/sun4/addend.exp
deleted file mode 100644
index 842f733..0000000
--- a/gas/testsuite/gas/sun4/addend.exp
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (C) 2012-2018 Free Software Foundation, Inc.
-
-# This program 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 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
-#
-# SunOS4 on SPARC tests
-#
-
-if [istarget sparc-*-sunos4*] then {
- run_dump_test "addend"
-}
diff --git a/gas/testsuite/gas/sun4/addend.s b/gas/testsuite/gas/sun4/addend.s
deleted file mode 100644
index 18eb108..0000000
--- a/gas/testsuite/gas/sun4/addend.s
+++ /dev/null
@@ -1,11 +0,0 @@
- .global foo
-foo:
- nop
- nop
- ba foo1+0x4
- ba foo1+0x4
- ba foo1
- ba foo1
- nop
- .word foo1
- .word foo1+4