Add support for building sh-*-netbsdelf (elf32-sh-big) and
shle-*-netbsdelf (elf32-sh-little).
This commit is contained in:
parent
a676fd1679
commit
6ed87749ed
|
@ -203,6 +203,7 @@ BFD32_BACKENDS = \
|
|||
elf32-ppc.lo \
|
||||
elf32-sh.lo \
|
||||
elf32-sh-lin.lo \
|
||||
elf32-sh-nbsd.lo \
|
||||
elf32-sparc.lo \
|
||||
elf32-v850.lo \
|
||||
elf32-vax.lo \
|
||||
|
@ -343,6 +344,7 @@ BFD32_BACKENDS_CFILES = \
|
|||
elf32-ppc.c \
|
||||
elf32-sh.c \
|
||||
elf32-sh-lin.c \
|
||||
elf32-sh-nbsd.c \
|
||||
elf32-sparc.c \
|
||||
elf32-v850.c \
|
||||
elf32-vax.c \
|
||||
|
@ -1072,6 +1074,10 @@ elf32-sh-lin.lo: elf32-sh-lin.c elf32-sh.c $(INCDIR)/filenames.h \
|
|||
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
|
||||
$(INCDIR)/elf/reloc-macros.h elf32-target.h
|
||||
elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \
|
||||
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
|
||||
$(INCDIR)/elf/reloc-macros.h elf32-target.h
|
||||
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
|
||||
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
|
||||
|
|
|
@ -326,6 +326,7 @@ BFD32_BACKENDS = \
|
|||
elf32-ppc.lo \
|
||||
elf32-sh.lo \
|
||||
elf32-sh-lin.lo \
|
||||
elf32-sh-nbsd.lo \
|
||||
elf32-sparc.lo \
|
||||
elf32-v850.lo \
|
||||
elf32-vax.lo \
|
||||
|
@ -467,6 +468,7 @@ BFD32_BACKENDS_CFILES = \
|
|||
elf32-ppc.c \
|
||||
elf32-sh.c \
|
||||
elf32-sh-lin.c \
|
||||
elf32-sh-nbsd.c \
|
||||
elf32-sparc.c \
|
||||
elf32-v850.c \
|
||||
elf32-vax.c \
|
||||
|
@ -1610,6 +1612,10 @@ elf32-sh-lin.lo: elf32-sh-lin.c elf32-sh.c $(INCDIR)/filenames.h \
|
|||
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
|
||||
$(INCDIR)/elf/reloc-macros.h elf32-target.h
|
||||
elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \
|
||||
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
|
||||
$(INCDIR)/elf/reloc-macros.h elf32-target.h
|
||||
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
|
||||
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
|
||||
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
|
||||
|
|
|
@ -47,6 +47,7 @@ mips*) targ_archs=bfd_mips_arch ;;
|
|||
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
|
||||
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
|
||||
rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
|
||||
sh*) targ_archs="bfd_sh_arch" ;;
|
||||
sparc*) targ_archs=bfd_sparc_arch ;;
|
||||
v850*) targ_archs=bfd_v850_arch ;;
|
||||
z8k*) targ_archs=bfd_z8k_arch ;;
|
||||
|
@ -763,6 +764,16 @@ case "${targ}" in
|
|||
targ_selvecs=bfd_elf32_shlin_vec
|
||||
;;
|
||||
|
||||
sh-*-netbsdelf*)
|
||||
targ_defvec=bfd_elf32_shnbsd_vec
|
||||
targ_selvecs="bfd_elf32_shlnbsd_vec bfd_elf32_sh_vec bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
|
||||
;;
|
||||
|
||||
shle-*-netbsdelf*)
|
||||
targ_defvec=bfd_elf32_shlnbsd_vec
|
||||
targ_selvecs="bfd_elf32_shnbsd_vec bfd_elf32_sh_vec bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
|
||||
;;
|
||||
|
||||
sh-*-elf* | sh-*-rtemself*)
|
||||
targ_defvec=bfd_elf32_sh_vec
|
||||
targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
|
||||
|
|
|
@ -5974,6 +5974,8 @@ do
|
|||
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
|
||||
bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
|
||||
bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
|
||||
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
|
||||
bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
|
||||
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
|
||||
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
|
||||
|
|
|
@ -547,6 +547,8 @@ do
|
|||
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
|
||||
bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
|
||||
bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
|
||||
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
|
||||
bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
|
||||
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
|
||||
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* Hitachi SH specific support for 32-bit NetBSD
|
||||
Copyright 2000 Free Software Foundation, Inc.
|
||||
|
||||
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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define TARGET_BIG_SYM bfd_elf32_shnbsd_vec
|
||||
#define TARGET_BIG_NAME "elf32-sh-nbsd"
|
||||
#define TARGET_LITTLE_SYM bfd_elf32_shlnbsd_vec
|
||||
#define TARGET_LITTLE_NAME "elf32-shl-nbsd"
|
||||
#define ELF_ARCH bfd_arch_sh
|
||||
#define ELF_MACHINE_CODE EM_SH
|
||||
#define ELF_MAXPAGESIZE 0x10000
|
||||
#define elf_symbol_leading_char 0
|
||||
|
||||
#include "elf32-sh.c"
|
|
@ -1,7 +0,0 @@
|
|||
#define TARGET_BIG_SYM bfd_elf32_shunx_vec
|
||||
#define TARGET_BIG_NAME "elf32-sh-unx"
|
||||
#define TARGET_LITTLE_SYM bfd_elf32_shlunx_vec
|
||||
#define TARGET_LITTLE_NAME "elf32-shl-unx"
|
||||
#define ELF_MAXPAGESIZE 0x1000
|
||||
|
||||
#include "elf32-sh.c"
|
|
@ -543,8 +543,8 @@ extern const bfd_target bfd_elf32_pj_vec;
|
|||
extern const bfd_target bfd_elf32_pjl_vec;
|
||||
extern const bfd_target bfd_elf32_powerpc_vec;
|
||||
extern const bfd_target bfd_elf32_powerpcle_vec;
|
||||
extern const bfd_target bfd_elf32_shunx_vec;
|
||||
extern const bfd_target bfd_elf32_shlunx_vec;
|
||||
extern const bfd_target bfd_elf32_shnbsd_vec;
|
||||
extern const bfd_target bfd_elf32_shlnbsd_vec;
|
||||
extern const bfd_target bfd_elf32_sh_vec;
|
||||
extern const bfd_target bfd_elf32_shblin_vec;
|
||||
extern const bfd_target bfd_elf32_shl_vec;
|
||||
|
|
|
@ -592,6 +592,9 @@ case "${target}" in
|
|||
# newlib is not 64 bit ready
|
||||
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||
;;
|
||||
sh*-*-netbsd*)
|
||||
noconfigdirs="$noconfigdirs gdb"
|
||||
;;
|
||||
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
|
||||
noconfigdirs="$noconfigdirs target-libjava target-libffi target-zlib"
|
||||
noconfigdirs="$noconfigdirs target-boehm-gc target-qthreads target-examples"
|
||||
|
|
|
@ -162,8 +162,8 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *));
|
|||
extern int target_big_endian;
|
||||
|
||||
#ifdef TE_NetBSD
|
||||
#define TARGET_FORMAT (shl ? "elf32-shl-unx" : "elf32-sh-unx")
|
||||
#elifdef TE_LINUX
|
||||
#define TARGET_FORMAT (shl ? "elf32-shl-nbsd" : "elf32-sh-nbsd")
|
||||
#elif defined(TE_LINUX)
|
||||
#define TARGET_FORMAT (shl ? "elf32-sh-linux" : "elf32-shbig-linux")
|
||||
#else
|
||||
#define TARGET_FORMAT (shl ? "elf32-shl" : "elf32-sh")
|
||||
|
|
|
@ -2258,6 +2258,8 @@ for this_target in $target $canon_targets ; do
|
|||
powerpcle*) cpu_type=ppc endian=little ;;
|
||||
powerpc*) cpu_type=ppc endian=big ;;
|
||||
rs6000*) cpu_type=ppc ;;
|
||||
sh*le) cpu_type=sh endian=little ;;
|
||||
sh*) cpu_type=sh endian=big ;;
|
||||
sparclite*) cpu_type=sparc arch=sparclite ;;
|
||||
sparclet*) cpu_type=sparc arch=sparclet ;;
|
||||
sparc64*) cpu_type=sparc arch=v9-64 ;;
|
||||
|
@ -2519,6 +2521,8 @@ EOF
|
|||
sh-*-elf*) fmt=elf ;;
|
||||
sh-*-coff*) fmt=coff ;;
|
||||
sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
|
||||
sh-*-netbsdelf*) fmt=elf em=nbsd ;;
|
||||
shle-*-netbsdelf*) fmt=elf em=nbsd ;;
|
||||
sh-*-rtemself*) fmt=elf ;;
|
||||
sh-*-rtems*) fmt=coff ;;
|
||||
|
||||
|
|
|
@ -142,6 +142,8 @@ changequote([,])dnl
|
|||
powerpcle*) cpu_type=ppc endian=little ;;
|
||||
powerpc*) cpu_type=ppc endian=big ;;
|
||||
rs6000*) cpu_type=ppc ;;
|
||||
sh*le) cpu_type=sh endian=little ;;
|
||||
sh*) cpu_type=sh endian=big ;;
|
||||
sparclite*) cpu_type=sparc arch=sparclite ;;
|
||||
sparclet*) cpu_type=sparc arch=sparclet ;;
|
||||
sparc64*) cpu_type=sparc arch=v9-64 ;;
|
||||
|
@ -394,6 +396,8 @@ changequote([,])dnl
|
|||
sh-*-elf*) fmt=elf ;;
|
||||
sh-*-coff*) fmt=coff ;;
|
||||
sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
|
||||
sh-*-netbsdelf*) fmt=elf em=nbsd ;;
|
||||
shle-*-netbsdelf*) fmt=elf em=nbsd ;;
|
||||
sh-*-rtemself*) fmt=elf ;;
|
||||
sh-*-rtems*) fmt=coff ;;
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/* Definitions of target machine for gcc for Hitachi Super-H using ELF.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC 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.
|
||||
|
||||
GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
|
||||
%{!mb:-D__LITTLE_ENDIAN__} \
|
||||
%{m1:-D__sh1__} \
|
||||
%{m2:-D__sh2__} \
|
||||
%{m3:-D__sh3__} \
|
||||
%{m3e:-D__SH3E__} \
|
||||
%{m4-single-only:-D__SH4_SINGLE_ONLY__} \
|
||||
%{m4-single:-D__SH4_SINGLE__} \
|
||||
%{m4:-D__SH4__} \
|
||||
%{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:-D__sh1__}}}}}}} \
|
||||
%{mhitachi:-D__HITACHI__}"
|
||||
|
||||
/* Pass -ml and -mrelax to the assembler and linker. */
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{mb:-m elf32shnbsd} %{mrelax:-relax} \
|
||||
%{assert*} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
-dc -dp \
|
||||
%{!nostdlib:%{!r*:%{!e*:-e __start}}} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
||||
%{static:-static}}"
|
|
@ -0,0 +1,165 @@
|
|||
/* Definitions of target machine for gcc for Hitachi Super-H using ELF.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Contributed by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC 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.
|
||||
|
||||
GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Mostly like the regular SH configuration. */
|
||||
#include "sh/sh.h"
|
||||
|
||||
/* No SDB debugging info. */
|
||||
#undef SDB_DEBUGGING_INFO
|
||||
|
||||
/* Undefine some macros defined in both sh.h and svr4.h. */
|
||||
#undef IDENT_ASM_OP
|
||||
#undef ASM_FILE_END
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
|
||||
#undef CTORS_SECTION_ASM_OP
|
||||
#undef DTORS_SECTION_ASM_OP
|
||||
#undef ASM_OUTPUT_SECTION_NAME
|
||||
#undef ASM_OUTPUT_CONSTRUCTOR
|
||||
#undef ASM_OUTPUT_DESTRUCTOR
|
||||
#undef ASM_DECLARE_FUNCTION_NAME
|
||||
#undef PREFERRED_DEBUGGING_TYPE
|
||||
#undef MAX_OFILE_ALIGNMENT
|
||||
|
||||
/* Be ELF-like. */
|
||||
#include "svr4.h"
|
||||
|
||||
/* Get generic NetBSD ELF definitions. */
|
||||
#define NETBSD_ELF
|
||||
#include <netbsd.h>
|
||||
|
||||
#define OBJECT_FORMAT_ELF
|
||||
|
||||
/* NetBSD uses the SVR4 convention for user-visible assembler symbols,
|
||||
not the SH convention. */
|
||||
|
||||
#undef LOCAL_LABEL_PREFIX
|
||||
#define LOCAL_LABEL_PREFIX "."
|
||||
|
||||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE) do { \
|
||||
output_file_directive ((FILE), main_input_filename); \
|
||||
if (TARGET_LITTLE_ENDIAN) \
|
||||
fprintf ((FILE), "\t.little\n"); \
|
||||
} while (0)
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
|
||||
%{ml:-D__LITTLE_ENDIAN__} \
|
||||
%{m1:-D__sh1__} \
|
||||
%{m2:-D__sh2__} \
|
||||
%{m3:-D__sh3__} \
|
||||
%{m3e:-D__SH3E__} \
|
||||
%{m4-single-only:-D__SH4_SINGLE_ONLY__} \
|
||||
%{m4-single:-D__SH4_SINGLE__} \
|
||||
%{m4:-D__SH4__} \
|
||||
%{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:-D__sh1__}}}}}}} \
|
||||
%{mhitachi:-D__HITACHI__}"
|
||||
|
||||
/* Let code know that this is ELF. */
|
||||
#define CPP_PREDEFINES \
|
||||
"-D__sh__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ \
|
||||
-Asystem(unix) -Asystem(NetBSD) -Acpu(sh) -Amachine(sh)"
|
||||
|
||||
/* Pass -ml and -mrelax to the assembler and linker. */
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{ml:-little} %{mrelax:-relax}"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{ml:-m elf32shlnbsd} %{mrelax:-relax} \
|
||||
%{assert*} \
|
||||
%{shared:-shared} \
|
||||
%{!shared: \
|
||||
-dc -dp \
|
||||
%{!nostdlib:%{!r*:%{!e*:-e __start}}} \
|
||||
%{!static: \
|
||||
%{rdynamic:-export-dynamic} \
|
||||
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
||||
%{static:-static}}"
|
||||
|
||||
/* svr4.h undefined DBX_REGISTER_NUMBER, so we need to define it
|
||||
again. */
|
||||
#define DBX_REGISTER_NUMBER(REGNO) \
|
||||
(((REGNO) >= 22 && (REGNO) <= 39) ? ((REGNO) + 1) : (REGNO))
|
||||
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
|
||||
sprintf ((STRING), "*%s%s%d", LOCAL_LABEL_PREFIX, (PREFIX), (NUM))
|
||||
|
||||
#undef ASM_OUTPUT_INTERNAL_LABEL
|
||||
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
|
||||
asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
|
||||
|
||||
#undef ASM_OUTPUT_SOURCE_LINE
|
||||
#define ASM_OUTPUT_SOURCE_LINE(file, line) \
|
||||
do \
|
||||
{ \
|
||||
static int sym_lineno = 1; \
|
||||
asm_fprintf ((file), ".stabn 68,0,%d,%LLM%d-", \
|
||||
(line), sym_lineno); \
|
||||
assemble_name ((file), \
|
||||
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
|
||||
asm_fprintf ((file), "\n%LLM%d:\n", sym_lineno); \
|
||||
sym_lineno += 1; \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
|
||||
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
|
||||
do { \
|
||||
text_section (); \
|
||||
fprintf ((FILE), "\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO); \
|
||||
} while (0)
|
||||
|
||||
/* HANDLE_SYSV_PRAGMA (defined by svr4.h) takes precedence over HANDLE_PRAGMA.
|
||||
We want to use the HANDLE_PRAGMA from sh.h. */
|
||||
#undef HANDLE_SYSV_PRAGMA
|
||||
|
||||
/* XXX shouldn't use "1f"-style labels */
|
||||
#undef FUNCTION_PROFILER
|
||||
#define FUNCTION_PROFILER(STREAM,LABELNO) \
|
||||
{ \
|
||||
fprintf((STREAM), "\tmov.l\t11f,r1\n"); \
|
||||
fprintf((STREAM), "\tmova\t12f,r0\n"); \
|
||||
fprintf((STREAM), "\tjmp\t@r1\n"); \
|
||||
fprintf((STREAM), "\tnop\n"); \
|
||||
fprintf((STREAM), "\t.align\t2\n"); \
|
||||
fprintf((STREAM), "11:\t.long\t__mcount\n"); \
|
||||
fprintf((STREAM), "12:\n"); \
|
||||
}
|
||||
|
||||
/* Make gcc agree with <machine/ansi.h> */
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "int"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
|
||||
#undef WCHAR_UNSIGNED
|
||||
#define WCHAR_UNSIGNED 0
|
||||
|
||||
#undef WCHAR_TYPE_SIZE
|
||||
#define WCHAR_TYPE_SIZE 32
|
|
@ -2944,6 +2944,9 @@ for machine in $build $host $target; do
|
|||
pyramid-*-*)
|
||||
cpu_type=pyr
|
||||
;;
|
||||
sh*-*-*)
|
||||
cpu_type=sh
|
||||
;;
|
||||
sparc*-*-*)
|
||||
cpu_type=sparc
|
||||
;;
|
||||
|
@ -5317,6 +5320,13 @@ for machine in $build $host $target; do
|
|||
tm_file=sh/elf.h
|
||||
float_format=sh
|
||||
;;
|
||||
sh-*-netbsdelf*)
|
||||
float_format=sh
|
||||
;;
|
||||
shle-*-netbsdelf*)
|
||||
tm_file="sh/netbsd-elf.h sh/netbsd-elf-little.h"
|
||||
float_format=sh;
|
||||
;;
|
||||
sh-*-rtemself*)
|
||||
tmake_file="sh/t-sh t-rtems"
|
||||
tm_file=sh/rtemself.h
|
||||
|
|
|
@ -510,6 +510,9 @@ changequote([,])dnl
|
|||
pyramid-*-*)
|
||||
cpu_type=pyr
|
||||
;;
|
||||
sh*-*-*)
|
||||
cpu_type=sh
|
||||
;;
|
||||
sparc*-*-*)
|
||||
cpu_type=sparc
|
||||
;;
|
||||
|
@ -3013,6 +3016,13 @@ changequote([,])dnl
|
|||
tm_file=sh/elf.h
|
||||
float_format=sh
|
||||
;;
|
||||
sh-*-netbsdelf*)
|
||||
float_format=sh
|
||||
;;
|
||||
shle-*-netbsdelf*)
|
||||
tm_file="sh/netbsd-elf.h sh/netbsd-elf-little.h"
|
||||
float_format=sh;
|
||||
;;
|
||||
sh-*-rtemself*)
|
||||
tmake_file="sh/t-sh t-rtems"
|
||||
tm_file=sh/rtemself.h
|
||||
|
|
|
@ -224,6 +224,8 @@ ALL_EMULATIONS = \
|
|||
eshelf.o \
|
||||
eshelf_linux.o \
|
||||
eshlelf_linux.o \
|
||||
eshelf_nbsd.o \
|
||||
eshlelf_nbsd.o \
|
||||
eshl.o \
|
||||
eshlelf.o \
|
||||
eshlunx.o \
|
||||
|
@ -735,6 +737,12 @@ eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
|
|||
eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
|
||||
eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
|
||||
eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
|
||||
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
|
||||
|
|
|
@ -332,6 +332,8 @@ ALL_EMULATIONS = \
|
|||
eshelf.o \
|
||||
eshelf_linux.o \
|
||||
eshlelf_linux.o \
|
||||
eshelf_nbsd.o \
|
||||
eshlelf_nbsd.o \
|
||||
eshl.o \
|
||||
eshlelf.o \
|
||||
eshlunx.o \
|
||||
|
@ -1449,6 +1451,12 @@ eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
|
|||
eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
|
||||
eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
|
||||
eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
|
||||
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
|
||||
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
|
||||
|
|
|
@ -230,6 +230,14 @@ sh-*-linux*)
|
|||
targ_emul=shelf_linux
|
||||
targ_extra_emuls=shlelf_linux
|
||||
;;
|
||||
sh-*-netbsdelf*)
|
||||
targ_emul=shelf_nbsd
|
||||
targ_extra_emuls=shlelf_nbsd
|
||||
;;
|
||||
shle-*-netbsdelf*)
|
||||
targ_emul=shlelf_nbsd
|
||||
targ_extra_emuls=shelf_nbsd
|
||||
;;
|
||||
sh-*-elf* | sh-*-rtemself*)
|
||||
targ_emul=shelf
|
||||
targ_extra_emuls="shlelf sh shl"
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
SCRIPT_NAME=elf
|
||||
OUTPUT_FORMAT="elf32-sh-nbsd"
|
||||
TEXT_START_ADDR=0x400000
|
||||
MAXPAGESIZE=0x10000
|
||||
ARCH=sh
|
||||
MACHINE=
|
||||
TEMPLATE_NAME=elf32
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
|
||||
DATA_START_SYMBOLS='__data_start = . ;';
|
||||
|
||||
OTHER_READWRITE_SECTIONS='
|
||||
.note.ABI-tag : { *(.note.ABI-tag) }
|
||||
'
|
|
@ -0,0 +1,14 @@
|
|||
SCRIPT_NAME=elf
|
||||
OUTPUT_FORMAT="elf32-shl-nbsd"
|
||||
TEXT_START_ADDR=0x400000
|
||||
MAXPAGESIZE=0x10000
|
||||
ARCH=sh
|
||||
MACHINE=
|
||||
TEMPLATE_NAME=elf32
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
|
||||
DATA_START_SYMBOLS='__data_start = . ;';
|
||||
|
||||
OTHER_READWRITE_SECTIONS='
|
||||
.note.ABI-tag : { *(.note.ABI-tag) }
|
||||
'
|
Loading…
Reference in New Issue