Fix an illegal memory access triggered when trying to examine an input file containin...
[deliverable/binutils-gdb.git] / bfd / coffcode.h
index 7bf7d68e03d70e2466dc4f0f83640a129e235f7b..dec2e9c63708107048ced5f1e99c3937187ac198 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
@@ -2161,11 +2161,14 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
       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_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:
@@ -2650,11 +2653,14 @@ coff_set_flags (bfd * abfd,
       *magicp = Z80MAGIC;
       switch (bfd_get_mach (abfd))
        {
-       case 0:
        case bfd_mach_z80strict:
        case bfd_mach_z80:
        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:
This page took 0.024051 seconds and 4 git commands to generate.