* config.bfd (sh-*-linux*): Added.
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 7 Sep 2000 04:23:43 +0000 (04:23 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 7 Sep 2000 04:23:43 +0000 (04:23 +0000)
* configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
* targets.c: Declare them.
* elf32-sh-lin.c: New file.
* Makefile.am: Compile it.
* elf32-sh.c: Don't override defines from elf32-sh-lin.c.
* configure, Makefile.in: Rebuilt.

bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/config.bfd
bfd/configure
bfd/configure.in
bfd/elf32-sh-lin.c [new file with mode: 0644]
bfd/elf32-sh.c
bfd/targets.c

index 3da3416169ac0e0f204033acf38bfefa55b0317b..800aeb3a68d207b1fd77210ab9832f516ccb3ecf 100644 (file)
@@ -1,3 +1,13 @@
+2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
+
+       * config.bfd (sh-*-linux*): Added.
+       * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
+       * targets.c: Declare them.
+       * elf32-sh-lin.c: New file.
+       * Makefile.am: Compile it.
+       * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
+       * configure, Makefile.in: Rebuilt.
+
 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
 
        * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
index ed94f29a32f9c72181c3d903ed22608d02959a3f..a16f78db4c76385ea2787c5d4a7b584416e14bd5 100644 (file)
@@ -198,6 +198,7 @@ BFD32_BACKENDS = \
        elf32-pj.lo \
        elf32-ppc.lo \
        elf32-sh.lo \
+       elf32-sh-lin.lo \
        elf32-sparc.lo \
        elf32-v850.lo \
        elf32.lo \
@@ -335,6 +336,7 @@ BFD32_BACKENDS_CFILES = \
        elf32-pj.c \
        elf32-ppc.c \
        elf32-sh.c \
+       elf32-sh-lin.c \
        elf32-sparc.c \
        elf32-v850.c \
        elf32.c \
@@ -1009,6 +1011,11 @@ elf32-sh.lo: 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
+# Keep this one in sync with the one above
+elf32-sh-lin.lo: 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-lin.c
 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 \
index 4ee242434fdf963e20f5a45d6d533addee02f8a1..2c089bd9148013a2049de0dcf31e07a284f62c5a 100644 (file)
@@ -319,6 +319,7 @@ BFD32_BACKENDS = \
        elf32-pj.lo \
        elf32-ppc.lo \
        elf32-sh.lo \
+       elf32-sh-lin.lo \
        elf32-sparc.lo \
        elf32-v850.lo \
        elf32.lo \
@@ -457,6 +458,7 @@ BFD32_BACKENDS_CFILES = \
        elf32-pj.c \
        elf32-ppc.c \
        elf32-sh.c \
+       elf32-sh-lin.c \
        elf32-sparc.c \
        elf32-v850.c \
        elf32.c \
@@ -1547,6 +1549,11 @@ elf32-sh.lo: 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
+# Keep this one in sync with the one above
+elf32-sh-lin.lo: 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-lin.c
 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 \
index 4c839d21904e3558fc90057a32ff78996abcbe7e..ec8f8d68559d470b647ba6321b9d82e3dc14f735 100644 (file)
@@ -683,6 +683,11 @@ case "${targ}" in
     targ_defvec=rs6000coff_vec
     ;;
 
+  sh-*-linux*)
+    targ_defvec=bfd_elf32_shblin_vec
+    targ_selvecs=bfd_elf32_shlin_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"
index 71a30cf7d913204f3d59a1ee76d7f594537c3dfa..413f7d0deab4e67d823782c0ffdff5e085357dd0 100755 (executable)
@@ -5869,6 +5869,8 @@ do
     bfd_elf32_powerpcle_vec)   tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
     bfd_elf32_sh_vec)          tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     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_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" ;;
@@ -6062,17 +6064,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6066: checking for $ac_hdr" >&5
+echo "configure:6068: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6071 "configure"
+#line 6073 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6101,12 +6103,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6105: checking for $ac_func" >&5
+echo "configure:6107: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6110 "configure"
+#line 6112 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6129,7 +6131,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6154,7 +6156,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6158: checking for working mmap" >&5
+echo "configure:6160: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6162,7 +6164,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6166 "configure"
+#line 6168 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6302,7 +6304,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:6306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -6327,12 +6329,12 @@ fi
 for ac_func in madvise mprotect
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6331: checking for $ac_func" >&5
+echo "configure:6333: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6336 "configure"
+#line 6338 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6355,7 +6357,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
index 37cb13b426a9a277696a2c8a4eaceb84e5a0cbc6..c7d648075105900fbbb9614b34f6664d109a7930 100644 (file)
@@ -522,6 +522,8 @@ do
     bfd_elf32_powerpcle_vec)   tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
     bfd_elf32_sh_vec)          tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     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_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" ;;
diff --git a/bfd/elf32-sh-lin.c b/bfd/elf32-sh-lin.c
new file mode 100644 (file)
index 0000000..1ee0a87
--- /dev/null
@@ -0,0 +1,29 @@
+/* Hitachi SH specific support for 32-bit Linux
+   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_shblin_vec
+#define TARGET_BIG_NAME "elf32-shbig-linux"
+#define TARGET_LITTLE_SYM bfd_elf32_shlin_vec
+#define TARGET_LITTLE_NAME "elf32-sh-linux"
+#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"
index acbf66147b4d5c1b52e4cd3e71c99d807b254a59..2cca369c0acc49d12db25abdd46dc11ff37af712 100644 (file)
@@ -4154,6 +4154,7 @@ sh_elf_finish_dynamic_sections (output_bfd, info)
   return true;
 }
 
+#ifndef ELF_ARCH
 #define TARGET_BIG_SYM         bfd_elf32_sh_vec
 #define TARGET_BIG_NAME                "elf32-sh"
 #define TARGET_LITTLE_SYM      bfd_elf32_shl_vec
@@ -4163,6 +4164,7 @@ sh_elf_finish_dynamic_sections (output_bfd, info)
 #define ELF_MAXPAGESIZE                0x1
 
 #define elf_symbol_leading_char '_'
+#endif /* ELF_ARCH */
 
 #define bfd_elf32_bfd_reloc_type_lookup        sh_elf_reloc_type_lookup
 #define elf_info_to_howto              sh_elf_info_to_howto
index 195572035fec7553bd693928f1cc3bfb41a2ce0d..986d88bb87b61a96f3ebd9d64d77327e69b6859e 100644 (file)
@@ -547,6 +547,8 @@ extern const bfd_target bfd_elf32_powerpc_vec;
 extern const bfd_target bfd_elf32_powerpcle_vec;
 extern const bfd_target bfd_elf32_sh_vec;
 extern const bfd_target bfd_elf32_shl_vec;
+extern const bfd_target bfd_elf32_shlin_vec;
+extern const bfd_target bfd_elf32_shblin_vec;
 extern const bfd_target bfd_elf32_sparc_vec;
 extern const bfd_target bfd_elf32_tradbigmips_vec;
 extern const bfd_target bfd_elf32_tradlittlemips_vec;
This page took 0.059311 seconds and 4 git commands to generate.