Add support for the GBZ80 and Z80N variants of the Z80 architecture, and add DWARF...
[deliverable/binutils-gdb.git] / bfd / coffcode.h
index 948bb705b0945ff749383a1ee7ffc55bb4221f81..96a7f20d3c7a0bc58c0c6a86a89e885635cac0c2 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for the generic parts of most COFF variants, for BFD.
 /* Support for the generic parts of most COFF variants, for BFD.
-   Copyright (C) 1990-2019 Free Software Foundation, Inc.
+   Copyright (C) 1990-2020 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -2161,11 +2161,15 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
       arch = bfd_arch_z80;
       switch (internal_f->f_flags & F_MACHMASK)
        {
       arch = bfd_arch_z80;
       switch (internal_f->f_flags & F_MACHMASK)
        {
-       case 0:
        case bfd_mach_z80strict << 12:
        case bfd_mach_z80 << 12:
        case bfd_mach_z80strict << 12:
        case bfd_mach_z80 << 12:
+       case bfd_mach_z80n << 12:
        case bfd_mach_z80full << 12:
        case bfd_mach_r800 << 12:
        case bfd_mach_z80full << 12:
        case bfd_mach_r800 << 12:
+       case bfd_mach_gbz80 << 12:
+       case bfd_mach_z180 << 12:
+       case bfd_mach_ez80_z80 << 12:
+       case bfd_mach_ez80_adl << 12:
          machine = ((unsigned)internal_f->f_flags & F_MACHMASK) >> 12;
          break;
        default:
          machine = ((unsigned)internal_f->f_flags & F_MACHMASK) >> 12;
          break;
        default:
@@ -2330,12 +2334,6 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
       break;
 #endif
 
       break;
 #endif
 
-#ifdef TIC80_ARCH_MAGIC
-    case TIC80_ARCH_MAGIC:
-      arch = bfd_arch_tic80;
-      break;
-#endif
-
 #ifdef MCOREMAGIC
     case MCOREMAGIC:
       arch = bfd_arch_mcore;
 #ifdef MCOREMAGIC
     case MCOREMAGIC:
       arch = bfd_arch_mcore;
@@ -2656,11 +2654,15 @@ coff_set_flags (bfd * abfd,
       *magicp = Z80MAGIC;
       switch (bfd_get_mach (abfd))
        {
       *magicp = Z80MAGIC;
       switch (bfd_get_mach (abfd))
        {
-       case 0:
        case bfd_mach_z80strict:
        case bfd_mach_z80:
        case bfd_mach_z80strict:
        case bfd_mach_z80:
+       case bfd_mach_z80n:
        case bfd_mach_z80full:
        case bfd_mach_r800:
        case bfd_mach_z80full:
        case bfd_mach_r800:
+       case bfd_mach_gbz80:
+       case bfd_mach_z180:
+       case bfd_mach_ez80_z80:
+       case bfd_mach_ez80_adl:
          *flagsp = bfd_get_mach (abfd) << 12;
          break;
        default:
          *flagsp = bfd_get_mach (abfd) << 12;
          break;
        default:
@@ -2715,12 +2717,6 @@ coff_set_flags (bfd * abfd,
       return TRUE;
 #endif
 
       return TRUE;
 #endif
 
-#ifdef TIC80_ARCH_MAGIC
-    case bfd_arch_tic80:
-      *magicp = TIC80_ARCH_MAGIC;
-      return TRUE;
-#endif
-
 #ifdef ARMMAGIC
     case bfd_arch_arm:
 #ifdef ARM_WINCE
 #ifdef ARMMAGIC
     case bfd_arch_arm:
 #ifdef ARM_WINCE
@@ -2883,7 +2879,7 @@ sort_by_secaddr (const void * arg1, const void * arg2)
 /* Calculate the file position for each section.  */
 
 #define ALIGN_SECTIONS_IN_FILE
 /* Calculate the file position for each section.  */
 
 #define ALIGN_SECTIONS_IN_FILE
-#if defined(TIC80COFF) || defined(TICOFF)
+#ifdef TICOFF
 #undef ALIGN_SECTIONS_IN_FILE
 #endif
 
 #undef ALIGN_SECTIONS_IN_FILE
 #endif
 
@@ -3811,9 +3807,6 @@ coff_write_object_contents (bfd * abfd)
      but it doesn't hurt to set it internally.  */
   internal_f.f_target_id = TI_TARGET_ID;
 #endif
      but it doesn't hurt to set it internally.  */
   internal_f.f_target_id = TI_TARGET_ID;
 #endif
-#ifdef TIC80_TARGET_ID
-  internal_f.f_target_id = TIC80_TARGET_ID;
-#endif
 
   /* FIXME, should do something about the other byte orders and
      architectures.  */
 
   /* FIXME, should do something about the other byte orders and
      architectures.  */
@@ -3841,10 +3834,6 @@ coff_write_object_contents (bfd * abfd)
     internal_a.magic = TICOFF_AOUT_MAGIC;
 #define __A_MAGIC_SET__
 #endif
     internal_a.magic = TICOFF_AOUT_MAGIC;
 #define __A_MAGIC_SET__
 #endif
-#ifdef TIC80COFF
-    internal_a.magic = TIC80_ARCH_MAGIC;
-#define __A_MAGIC_SET__
-#endif /* TIC80 */
 
 #if defined(ARM)
 #define __A_MAGIC_SET__
 
 #if defined(ARM)
 #define __A_MAGIC_SET__
@@ -4775,7 +4764,7 @@ coff_slurp_symbol_table (bfd * abfd)
            case C_ALIAS:       /* Duplicate tag.  */
 #endif
              /* New storage classes for TI COFF.  */
            case C_ALIAS:       /* Duplicate tag.  */
 #endif
              /* New storage classes for TI COFF.  */
-#if defined(TIC80COFF) || defined(TICOFF)
+#ifdef TICOFF
            case C_UEXT:        /* Tentative external definition.  */
 #endif
            case C_EXTLAB:      /* External load time label.  */
            case C_UEXT:        /* Tentative external definition.  */
 #endif
            case C_EXTLAB:      /* External load time label.  */
@@ -5661,7 +5650,7 @@ static bfd_coff_backend_data bigobj_swap_table =
 #endif /* COFF_WITH_PE_BIGOBJ */
 
 #ifndef coff_close_and_cleanup
 #endif /* COFF_WITH_PE_BIGOBJ */
 
 #ifndef coff_close_and_cleanup
-#define coff_close_and_cleanup             _bfd_generic_close_and_cleanup
+#define coff_close_and_cleanup             _bfd_coff_close_and_cleanup
 #endif
 
 #ifndef coff_bfd_free_cached_info
 #endif
 
 #ifndef coff_bfd_free_cached_info
This page took 0.027471 seconds and 4 git commands to generate.