aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1994-11-24 03:33:48 +0000
committerSteve Chamberlain <sac@cygnus>1994-11-24 03:33:48 +0000
commit7a1d45675ede253f71a197f50d88de0cb57a19cd (patch)
treece6b058ecb36178cafc040826ccb3a15f9c28dca
parent3585593df6ce8767051e17220e6d03f697053dc5 (diff)
downloadgdb-7a1d45675ede253f71a197f50d88de0cb57a19cd.zip
gdb-7a1d45675ede253f71a197f50d88de0cb57a19cd.tar.gz
gdb-7a1d45675ede253f71a197f50d88de0cb57a19cd.tar.bz2
* coff-sh.c (shlcoff_vec): New target vector.
(no_archive): New function. * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Handle little endian SH. * configure.in: Handle shl. * targets.c (bfd_target_vector): Add shlcoff_vec. * config/sh-coff.mt (SELECT_VECS): Handle shl_coff_vec.
-rw-r--r--bfd/ChangeLog17
-rw-r--r--bfd/coff-sh.c55
-rw-r--r--bfd/configure.in3
-rw-r--r--bfd/targets.c4
4 files changed, 76 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9328f6d..2370cc1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,20 @@
+Wed Nov 23 19:21:41 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * coff-sh.c (shlcoff_vec): New target vector.
+ (no_archive): New function.
+ * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Handle
+ little endian SH.
+ * configure.in: Handle shl.
+ * targets.c (bfd_target_vector): Add shlcoff_vec.
+ * config/sh-coff.mt (SELECT_VECS): Handle shl_coff_vec.
+
+Wed Nov 23 10:50:13 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * elfcode.h (write_relocs): Do not subtract the section's vma from
+ the reloc's offset when writing .o's. Instead add the section's
+ vma to the reloc's offset when writing an executable or shared
+ library.
+
Tue Nov 22 23:34:37 1994 Jeff Law (law@snake.cs.utah.edu)
* elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Do not add
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index 659b701..80f4af4 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -32,7 +32,7 @@ static bfd_reloc_status_type sh_reloc();
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
-#define COFF_LONG_FILENAMES
+/*#define COFF_LONG_FILENAMES*/
static reloc_howto_type r_imm32 =
{R_SH_IMM32, 0, 2, 32, false, 0,
@@ -263,7 +263,6 @@ coff_sh_relocate_section (output_bfd, info, input_bfd, input_section,
}
#define coff_relocate_section coff_sh_relocate_section
-
#include "coffcode.h"
const bfd_target shcoff_vec =
@@ -309,3 +308,55 @@ const bfd_target shcoff_vec =
COFF_SWAP_TABLE,
};
+
+static int no_archive()
+{
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+}
+const bfd_target shlcoff_vec =
+{
+ "coff-shl", /* name */
+ bfd_target_coff_flavour,
+ false, /* data byte order is little */
+ false, /* header byte order is little endian too*/
+
+ (HAS_RELOC | EXEC_P | /* object flags */
+ HAS_LINENO | HAS_DEBUG |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE ),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+ 2, /* minimum section alignment */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+/* Note that we use a special archive recognizer.
+ This is so that we only use one archive format for both
+ object file types */
+ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
+ no_archive, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ COFF_SWAP_TABLE,
+};
+
diff --git a/bfd/configure.in b/bfd/configure.in
index 5963342..41d31cd 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -198,10 +198,11 @@ do
target64=true ;;
riscix_vec) tb="$tb aout32.o riscix.o stab-syms.o" ;;
nlm32_powerpc_vec) tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;;
- ns32knetbsd_vec) tb="$tb ns32knetbsd.o aout-ns32k.o stab-syms.o" ;;
+ pc532netbsd_vec) tb="$tb ns32knetbsd.o aout-ns32k.o stab-syms.o" ;;
pc532machaout_vec) tb="$tb pc532-mach.o aout-ns32k.o stab-syms.o" ;;
rs6000coff_vec) tb="$tb coff-rs6000.o" ;;
shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
+ shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
som_vec) tb="$tb som.o" ;;
sparclynx_aout_vec) tb="$tb sparclynx.o lynx-core.o aout32.o stab-syms.o" ;;
sparclynx_coff_vec) tb="$tb cf-sparclynx.o lynx-core.o stab-syms.o" ;;
diff --git a/bfd/targets.c b/bfd/targets.c
index 1da5c5f..5cf0130 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -472,6 +472,7 @@ extern const bfd_target m68kcoff_vec;
extern const bfd_target m68kcoffun_vec;
extern const bfd_target m68klynx_aout_vec;
extern const bfd_target m68klynx_coff_vec;
+extern const bfd_target m68knetbsd_vec;
extern const bfd_target m88kbcs_vec;
extern const bfd_target m88kmach3_vec;
extern const bfd_target newsos3_vec;
@@ -485,6 +486,7 @@ extern const bfd_target pc532machaout_vec;
extern const bfd_target riscix_vec;
extern const bfd_target rs6000coff_vec;
extern const bfd_target shcoff_vec;
+extern const bfd_target shlcoff_vec;
extern const bfd_target sparclynx_aout_vec;
extern const bfd_target sparclynx_coff_vec;
extern const bfd_target sparcnetbsd_vec;
@@ -609,6 +611,7 @@ const bfd_target * const bfd_target_vector[] = {
&m68kcoffun_vec,
&m68klynx_aout_vec,
&m68klynx_coff_vec,
+ &m68knetbsd_vec,
&m88kbcs_vec,
&m88kmach3_vec,
&newsos3_vec,
@@ -633,6 +636,7 @@ const bfd_target * const bfd_target_vector[] = {
#endif
&rs6000coff_vec,
&shcoff_vec,
+ &shlcoff_vec,
&sparclynx_aout_vec,
&sparclynx_coff_vec,
&sparcnetbsd_vec,