/* 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, 98, 1999
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
#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 *));
#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 ATTRIBUTE_UNUSED;
+ 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)
PTR data;
asection *input_section;
bfd *output_bfd;
- char **error_message;
+ char **error_message ATTRIBUTE_UNUSED;
{
reloc_howto_type *howto = reloc_entry->howto;
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)
{
"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 |