* elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
[deliverable/binutils-gdb.git] / bfd / coff-m88k.c
index b00cfde5b658cb2ec57c3161ed347e113e3f32e0..8da0b052530cad309ad6d548c2fa32079918d906 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Motorola 88000 COFF "Binary Compatability Standard" files.
-   Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+   Copyright 1990, 91, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -22,11 +22,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "bfd.h"
 #include "sysdep.h"
 #include "libbfd.h"
-#include "obstack.h"
 #include "coff/m88k.h"
 #include "coff/internal.h"
 #include "libcoff.h"
 
+static boolean m88k_is_local_label_name PARAMS ((bfd *, const char *));
 static bfd_reloc_status_type m88k_special_reloc
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
@@ -35,6 +35,21 @@ static void reloc_processing
 
 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
 
+#define GET_SCNHDR_NRELOC bfd_h_get_32
+#define GET_SCNHDR_NLNNO bfd_h_get_32
+
+/* On coff-m88k, local labels start with '@'.  */
+
+#define coff_bfd_is_local_label_name m88k_is_local_label_name
+
+static boolean
+m88k_is_local_label_name (abfd, name)
+     bfd *abfd;
+     const char *name;
+{
+  return name[0] == '@';
+}
+
 static bfd_reloc_status_type 
 m88k_special_reloc (abfd, reloc_entry, symbol, data,
                    input_section, output_bfd, error_message)
@@ -102,8 +117,12 @@ m88k_special_reloc (abfd, reloc_entry, symbol, data,
              bfd_put_16 (abfd, relocation, (unsigned char *) data + addr);
        }
 
+      /* If we are not producing relocateable output, return an error if
+        the symbol is not defined.  */
+      if (bfd_is_und_section (symbol->section) && output_bfd == (bfd *) NULL)
+       return bfd_reloc_undefined;
+
       return bfd_reloc_ok;
-      break;
 
     default:
       if (output_bfd != (bfd *) NULL)
@@ -272,8 +291,8 @@ const bfd_target m88kbcs_vec =
 {
   "coff-m88kbcs",              /* name */
   bfd_target_coff_flavour,
-  true,                                /* data byte order is big */
-  true,                                /* header byte order is big */
+  BFD_ENDIAN_BIG,              /* data byte order is big */
+  BFD_ENDIAN_BIG,              /* header byte order is big */
 
   (HAS_RELOC | EXEC_P |                /* object flags */
    HAS_LINENO | HAS_DEBUG |
This page took 0.024294 seconds and 4 git commands to generate.