Commit c9098af4 authored by Alan Modra's avatar Alan Modra

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.
parent dc12032b
2018-04-16 Alan Modra <amodra@gmail.com>
* 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.
2018-04-16 Alan Modra <amodra@gmail.com>
* Makefile.am: Remove m68k-aout and m68k-coff support.
......
......@@ -260,19 +260,16 @@ BFD32_BACKENDS = \
aout-arm.lo \
aout-cris.lo \
aout-ns32k.lo \
aout-sparcle.lo \
aout-tic30.lo \
aout32.lo \
armnetbsd.lo \
cf-i386lynx.lo \
cf-sparclynx.lo \
coff-arm.lo \
coff-go32.lo \
coff-i386.lo \
coff-mips.lo \
coff-rs6000.lo \
coff-sh.lo \
coff-sparc.lo \
coff-stgo32.lo \
coff-tic30.lo \
coff-tic4x.lo \
......@@ -400,10 +397,6 @@ BFD32_BACKENDS = \
reloc16.lo \
riscix.lo \
som.lo \
sparclinux.lo \
sparclynx.lo \
sparcnetbsd.lo \
sunos.lo \
vax1knetbsd.lo \
vaxnetbsd.lo \
vms-lib.lo \
......@@ -418,19 +411,16 @@ BFD32_BACKENDS_CFILES = \
aout-arm.c \
aout-cris.c \
aout-ns32k.c \
aout-sparcle.c \
aout-tic30.c \
aout32.c \
armnetbsd.c \
cf-i386lynx.c \
cf-sparclynx.c \
coff-arm.c \
coff-go32.c \
coff-i386.c \
coff-mips.c \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
coff-stgo32.c \
coff-tic30.c \
coff-tic4x.c \
......@@ -557,10 +547,6 @@ BFD32_BACKENDS_CFILES = \
reloc16.c \
riscix.c \
som.c \
sparclinux.c \
sparclynx.c \
sparcnetbsd.c \
sunos.c \
vax1knetbsd.c \
vaxnetbsd.c \
vms-lib.c \
......@@ -585,7 +571,6 @@ BFD64_BACKENDS = \
coff-alpha.lo \
coff-x86_64.lo \
coff64-rs6000.lo \
demo64.lo \
elf32-ia64.lo \
elf32-mips.lo \
elf32-score.lo \
......@@ -626,7 +611,6 @@ BFD64_BACKENDS_CFILES = \
coff-alpha.c \
coff-x86_64.c \
coff64-rs6000.c \
demo64.c \
elf32-mips.c \
elf32-score.c \
elf32-score7.c \
......@@ -717,7 +701,7 @@ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
aout-target.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
elf-bfd.h elf-hppa.h elf-linux-core.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
......
......@@ -594,19 +594,16 @@ BFD32_BACKENDS = \
aout-arm.lo \
aout-cris.lo \
aout-ns32k.lo \
aout-sparcle.lo \
aout-tic30.lo \
aout32.lo \
armnetbsd.lo \
cf-i386lynx.lo \
cf-sparclynx.lo \
coff-arm.lo \
coff-go32.lo \
coff-i386.lo \
coff-mips.lo \
coff-rs6000.lo \
coff-sh.lo \
coff-sparc.lo \
coff-stgo32.lo \
coff-tic30.lo \
coff-tic4x.lo \
......@@ -734,10 +731,6 @@ BFD32_BACKENDS = \
reloc16.lo \
riscix.lo \
som.lo \
sparclinux.lo \
sparclynx.lo \
sparcnetbsd.lo \
sunos.lo \
vax1knetbsd.lo \
vaxnetbsd.lo \
vms-lib.lo \
......@@ -752,19 +745,16 @@ BFD32_BACKENDS_CFILES = \
aout-arm.c \
aout-cris.c \
aout-ns32k.c \
aout-sparcle.c \
aout-tic30.c \
aout32.c \
armnetbsd.c \
cf-i386lynx.c \
cf-sparclynx.c \
coff-arm.c \
coff-go32.c \
coff-i386.c \
coff-mips.c \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
coff-stgo32.c \
coff-tic30.c \
coff-tic4x.c \
......@@ -891,10 +881,6 @@ BFD32_BACKENDS_CFILES = \
reloc16.c \
riscix.c \
som.c \
sparclinux.c \
sparclynx.c \
sparcnetbsd.c \
sunos.c \
vax1knetbsd.c \
vaxnetbsd.c \
vms-lib.c \
......@@ -920,7 +906,6 @@ BFD64_BACKENDS = \
coff-alpha.lo \
coff-x86_64.lo \
coff64-rs6000.lo \
demo64.lo \
elf32-ia64.lo \
elf32-mips.lo \
elf32-score.lo \
......@@ -961,7 +946,6 @@ BFD64_BACKENDS_CFILES = \
coff-alpha.c \
coff-x86_64.c \
coff64-rs6000.c \
demo64.c \
elf32-mips.c \
elf32-score.c \
elf32-score7.c \
......@@ -1052,7 +1036,7 @@ BUILD_CFILES = \
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
aout-target.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
elf-bfd.h elf-hppa.h elf-linux-core.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
......@@ -1227,7 +1211,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-arm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-cris.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-ns32k.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-sparcle.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-tic30.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout64.Plo@am__quote@
......@@ -1241,7 +1224,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf-i386lynx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf-sparclynx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cisco-core.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-alpha.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-arm.Plo@am__quote@
......@@ -1251,7 +1233,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-mips.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-rs6000.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-sh.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-sparc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-stgo32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-tic30.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-tic4x.Plo@am__quote@
......@@ -1346,7 +1327,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-xtensa.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-z80.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-z8k.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf1.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecoff.Plo@am__quote@
......@@ -1517,13 +1497,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/som.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparclinux.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparclynx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparcnetbsd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stab-syms.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stabs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sunos.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syms.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/targets.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tekhex.Plo@am__quote@
......
/* BFD backend for sparc little-endian aout binaries.
Copyright (C) 1996-2018 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
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. */
#define TARGETNAME "a.out-sparc-little"
/* Do not "beautify" the CONCAT* macro args. Traditional C will not
remove whitespace added here, and thus will fail to concatenate
the tokens. */
#define MY(OP) CONCAT2 (sparc_aout_le_,OP)
#include "sysdep.h"
#include "bfd.h"
#include "bfdlink.h"
#include "libaout.h"
#define MACHTYPE_OK(mtype) ((mtype) == M_SPARC || (mtype) == M_SPARCLET)
/* Include the usual a.out support. */
#define TARGET_IS_LITTLE_ENDIAN_P
#include "aoutf1.h"
This diff is collapsed.
/* BFD back-end for Sparc COFF LynxOS files.
Copyright (C) 1993-2018 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
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. */
#define TARGET_SYM sparc_coff_lynx_vec
#define TARGET_NAME "coff-sparc-lynx"
#define LYNXOS
#define COFF_LONG_FILENAMES
#include "coff-sparc.c"
/* BFD back-end for Sparc COFF files.
Copyright (C) 1990-2018 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
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. */
#include "sysdep.h"
#include "bfd.h"
#include "libbfd.h"
#include "coff/sparc.h"
#include "coff/internal.h"
#include "libcoff.h"
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
#define BADMAG(x) ((x).f_magic != SPARCMAGIC && (x).f_magic != LYNXCOFFMAGIC)
/* The page size is a guess based on ELF. */
#define COFF_PAGE_SIZE 0x10000
enum reloc_type
{
R_SPARC_NONE = 0,
R_SPARC_8, R_SPARC_16, R_SPARC_32,
R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32,
R_SPARC_WDISP30, R_SPARC_WDISP22,
R_SPARC_HI22, R_SPARC_22,
R_SPARC_13, R_SPARC_LO10,
R_SPARC_GOT10, R_SPARC_GOT13, R_SPARC_GOT22,
R_SPARC_PC10, R_SPARC_PC22,
R_SPARC_WPLT30,
R_SPARC_COPY,
R_SPARC_GLOB_DAT, R_SPARC_JMP_SLOT,
R_SPARC_RELATIVE,
R_SPARC_UA32,
R_SPARC_max
};
/* This is stolen pretty directly from elf.c. */
static bfd_reloc_status_type
bfd_coff_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED,
arelent *reloc_entry,
asymbol *symbol,
void * data ATTRIBUTE_UNUSED,
asection *input_section,
bfd *output_bfd,
char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
return bfd_reloc_continue;
}
static reloc_howto_type coff_sparc_howto_table[] =
{
HOWTO(R_SPARC_NONE, 0,3, 0,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_NONE", FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_8", FALSE,0,0x000000ff,TRUE),
HOWTO(R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_16", FALSE,0,0x0000ffff,TRUE),
HOWTO(R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_32", FALSE,0,0xffffffff,TRUE),
HOWTO(R_SPARC_DISP8, 0,0, 8,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP8", FALSE,0,0x000000ff,TRUE),
HOWTO(R_SPARC_DISP16, 0,1,16,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP16", FALSE,0,0x0000ffff,TRUE),
HOWTO(R_SPARC_DISP32, 0,2,32,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_DISP32", FALSE,0,0x00ffffff,TRUE),
HOWTO(R_SPARC_WDISP30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_WDISP30", FALSE,0,0x3fffffff,TRUE),
HOWTO(R_SPARC_WDISP22, 2,2,22,TRUE, 0,complain_overflow_signed, bfd_coff_generic_reloc,"R_SPARC_WDISP22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_HI22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_HI22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_22, 0,2,22,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_13, 0,2,13,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_13", FALSE,0,0x00001fff,TRUE),
HOWTO(R_SPARC_LO10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_LO10", FALSE,0,0x000003ff,TRUE),
HOWTO(R_SPARC_GOT10, 0,2,10,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT10", FALSE,0,0x000003ff,TRUE),
HOWTO(R_SPARC_GOT13, 0,2,13,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT13", FALSE,0,0x00001fff,TRUE),
HOWTO(R_SPARC_GOT22, 10,2,22,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_GOT22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_PC10, 0,2,10,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_PC10", FALSE,0,0x000003ff,TRUE),
HOWTO(R_SPARC_PC22, 0,2,22,FALSE,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_PC22", FALSE,0,0x003fffff,TRUE),
HOWTO(R_SPARC_WPLT30, 0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_WPLT30", FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_COPY, 0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_COPY", FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_GLOB_DAT,0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_GLOB_DAT",FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_JMP_SLOT,0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_JMP_SLOT",FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_RELATIVE,0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_RELATIVE",FALSE,0,0x00000000,TRUE),
HOWTO(R_SPARC_UA32, 0,0,00,FALSE,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_UA32", FALSE,0,0x00000000,TRUE),
};
struct coff_reloc_map
{
bfd_reloc_code_real_type bfd_reloc_val;
unsigned char coff_reloc_val;
};
static const struct coff_reloc_map sparc_reloc_map[] =
{
{ BFD_RELOC_NONE, R_SPARC_NONE, },
{ BFD_RELOC_16, R_SPARC_16, },
{ BFD_RELOC_8, R_SPARC_8 },
{ BFD_RELOC_8_PCREL, R_SPARC_DISP8 },
{ BFD_RELOC_CTOR, R_SPARC_32 }, /* @@ Assumes 32 bits. */
{ BFD_RELOC_32, R_SPARC_32 },
{ BFD_RELOC_32_PCREL, R_SPARC_DISP32 },
{ BFD_RELOC_HI22, R_SPARC_HI22 },
{ BFD_RELOC_LO10, R_SPARC_LO10, },
{ BFD_RELOC_32_PCREL_S2, R_SPARC_WDISP30 },
{ BFD_RELOC_SPARC22, R_SPARC_22 },
{ BFD_RELOC_SPARC13, R_SPARC_13 },
{ BFD_RELOC_SPARC_GOT10, R_SPARC_GOT10 },
{ BFD_RELOC_SPARC_GOT13, R_SPARC_GOT13 },
{ BFD_RELOC_SPARC_GOT22, R_SPARC_GOT22 },
{ BFD_RELOC_SPARC_PC10, R_SPARC_PC10 },
{ BFD_RELOC_SPARC_PC22, R_SPARC_PC22 },
{ BFD_RELOC_SPARC_WPLT30, R_SPARC_WPLT30 },
{ BFD_RELOC_SPARC_COPY, R_SPARC_COPY },
{ BFD_RELOC_SPARC_GLOB_DAT, R_SPARC_GLOB_DAT },
{ BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
{ BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
{ BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
/* { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */
};
static reloc_howto_type *
coff_sparc_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
bfd_reloc_code_real_type code)
{
unsigned int i;
for (i = 0; i < sizeof (sparc_reloc_map) / sizeof (struct coff_reloc_map); i++)
{
if (sparc_reloc_map[i].bfd_reloc_val == code)
return &coff_sparc_howto_table[(int) sparc_reloc_map[i].coff_reloc_val];
}
return 0;
}
#define coff_bfd_reloc_type_lookup coff_sparc_reloc_type_lookup
static reloc_howto_type *
coff_sparc_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
const char *r_name)
{
unsigned int i;
for (i = 0;
i < (sizeof (coff_sparc_howto_table)
/ sizeof (coff_sparc_howto_table[0]));
i++)
if (coff_sparc_howto_table[i].name != NULL
&& strcasecmp (coff_sparc_howto_table[i].name, r_name) == 0)
return &coff_sparc_howto_table[i];
return NULL;
}
#define coff_bfd_reloc_name_lookup coff_sparc_reloc_name_lookup
static void
rtype2howto (arelent *cache_ptr, struct internal_reloc *dst)
{
BFD_ASSERT (dst->r_type < (unsigned int) R_SPARC_max);
cache_ptr->howto = &coff_sparc_howto_table[dst->r_type];
}
#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
#define SWAP_IN_RELOC_OFFSET H_GET_32
#define SWAP_OUT_RELOC_OFFSET H_PUT_32
#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
cache_ptr->addend = reloc.r_offset;
/* Clear the r_spare field in relocs. */
#define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \
do { \
dst->r_spare[0] = 0; \
dst->r_spare[1] = 0; \
} while (0)
#define __A_MAGIC_SET__
/* Enable Sparc-specific hacks in coffcode.h. */
#define COFF_SPARC
#define bfd_pe_print_pdata NULL
#include "coffcode.h"
#ifndef TARGET_SYM
#define TARGET_SYM sparc_coff_vec
#endif
#ifndef TARGET_NAME
#define TARGET_NAME "coff-sparc"
#endif
CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)
......@@ -84,14 +84,6 @@ case $targ in
mips*-*-lnews* | \
mips*-*-sysv* | mips*-*-riscos* | \
powerpc-*-lynxos* | powerpc-*-windiss* | \
sparclet-*-aout* | \
sparc86x-*-aout* | \
sparc*-*-chorus* | \
sparc-*-linux*aout* | \
sparc-*-netbsdaout* | \
sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1] | \
sparc64-*-aout* | \
sparc*-*-coff* | \
null)
if test "x$enable_obsolete" != xyes; then
echo "*** Configuration $targ is obsolete." >&2
......@@ -144,7 +136,11 @@ case $targ in
maxq-*-coff | \
mips*el-*-rtems* | \
sh*-*-symbianelf* | sh5*-*-* | sh64*-*-* | \
sparc*-*-*aout* | \
sparc*-*-chorus* | \
sparc*-*-coff* | \
sparc-*-lynxos* | \
sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1] | \
tahoe-*-* | \
vax-*-bsd* | vax-*-ultrix* | vax-*-vms* | \
w65-*-* | \
......@@ -329,15 +325,6 @@ case "${targ}" in
targ_selvecs=alpha_vms_lib_txt_vec
want64=true
;;
sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
targ_defvec=sparc_elf64_fbsd_vec
targ_selvecs="sparc_elf64_vec sparc_elf32_vec sparc_aout_sunos_be_vec"
;;
sparc64-*-netbsd* | sparc64-*-openbsd*)
targ_defvec=sparc_elf64_vec
targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
want64=true
;;
#endif /* BFD64 */
am33_2.0-*-linux*)
......@@ -1407,96 +1394,35 @@ case "${targ}" in
targ_underscore=yes
;;
sparclet-*-aout*)
targ_defvec=sparc_aout_sunos_be_vec
targ_selvecs=sparc_aout_le_vec
targ_underscore=yes
;;
sparc86x-*-aout*)
targ_defvec=sparc_aout_sunos_be_vec
targ_underscore=yes
;;
sparclite-*-elf* | sparc86x-*-elf*)
targ_defvec=sparc_elf32_vec
;;
sparc*-*-chorus*)
targ_defvec=sparc_elf32_vec
;;
sparc-*-linux*aout*)
targ_defvec=sparc_aout_linux_vec
targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
targ_underscore=yes
;;
sparc-*-linux-* | sparcv*-*-linux-*)
targ_defvec=sparc_elf32_vec
targ_selvecs="sparc_aout_linux_vec sparc_elf64_vec sparc_aout_sunos_be_vec"
;;
sparc-*-netbsdelf*)
targ_defvec=sparc_elf32_vec
targ_selvecs=sparc_aout_nbsd_vec
;;
sparc-*-netbsdaout* | sparc-*-netbsd*)
targ_defvec=sparc_aout_nbsd_vec
targ_selvecs=sparc_elf32_vec
targ_underscore=yes
;;
sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1])
targ_defvec=sparc_aout_nbsd_vec
targ_underscore=yes
;;
sparc-*-openbsd*)
targ_defvec=sparc_elf32_vec
targ_selvecs=sparc_aout_nbsd_vec
;;
sparc-*-elf*)
targ_defvec=sparc_elf32_vec
targ_selvecs=sparc_aout_sunos_be_vec
;;
sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
targ_defvec=sparc_elf32_sol2_vec
targ_selvecs=sparc_aout_sunos_be_vec
;;
#ifdef BFD64
sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
targ_defvec=sparc_elf32_sol2_vec
targ_selvecs="sparc_elf64_sol2_vec sparc_aout_sunos_be_vec"
targ_selvecs="sparc_elf64_sol2_vec"
want64=true
;;
#endif
sparc-*-sysv4*)
targ_defvec=sparc_elf32_vec
;;
sparc-*-vxworks*)
targ_defvec=sparc_elf32_vxworks_vec
targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
;;
#ifdef BFD64
sparc64-*-aout*)
targ_defvec=sparc_aout_sunos_be_vec
targ_underscore=yes
want64=true
;;
sparc64*-*-linux-*)
targ_defvec=sparc_elf64_vec
targ_selvecs="sparc_elf32_vec sparc_aout_linux_vec sparc_aout_sunos_be_vec"
want64=true
sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
targ_defvec=sparc_elf64_fbsd_vec
targ_selvecs="sparc_elf64_vec sparc_elf32_vec"
;;
sparc64-*-elf* | sparc64-*-rtems* )
sparc64*-*-*)
targ_defvec=sparc_elf64_vec
targ_selvecs=sparc_elf32_vec
targ_selvecs="sparc_elf32_vec"
want64=true
;;
#endif /* BFD64 */
sparc*-*-coff*)
targ_defvec=sparc_coff_vec
;;
sparc-*-rtems*)
#endif
sparc-*-linux-* | sparcv*-*-linux-*)
targ_defvec=sparc_elf32_vec
targ_selvecs="sparc_aout_sunos_be_vec sparc_coff_vec"