diff options
-rw-r--r-- | bfd/ChangeLog | 13 | ||||
-rw-r--r-- | bfd/elfcode.h | 24 |
2 files changed, 21 insertions, 16 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 96c1489..c28df205 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,18 @@ Fri Apr 22 11:08:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + * aout-adobe.c (aout_adobe_set_arch_mach): Check return value of + bfd_default_set_arch_mach. Accept bfd_arch_m68k as well as + bfd_arch_unknown. + * coffcode.h (coff_set_arch_mach): Check return value of + bfd_default_set_arch_mach. + * elfcode.h (elf_set_arch_mach): Don't check a list of ELF + architectures, just see if the desired architecture matches what + the ELF backend permits. + + * coffcode.h (coff_set_arch_mach_hook): Rename SHMAGIC to + SH_ARCH_MAGIC to match change in coff/sh.h. + (coff_set_flags): Likewise. + Follow convention in which each NLM header has an 8 byte stamp followed by a four byte length. * libnlm.h (struct nlm_obj_tdata): Rename nlm_cygnus_section_hdr diff --git a/bfd/elfcode.h b/bfd/elfcode.h index a93ac60..ba9e456 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -3237,22 +3237,14 @@ elf_set_arch_mach (abfd, arch, machine) enum bfd_architecture arch; unsigned long machine; { - /* Allow any architecture to be supported by the elf backend */ - switch (arch) - { - case bfd_arch_unknown: /* EM_NONE */ - case bfd_arch_sparc: /* EM_SPARC */ - case bfd_arch_i386: /* EM_386 */ - case bfd_arch_m68k: /* EM_68K */ - case bfd_arch_m88k: /* EM_88K */ - case bfd_arch_i860: /* EM_860 */ - case bfd_arch_mips: /* EM_MIPS (MIPS R3000) */ - case bfd_arch_hppa: /* EM_HPPA (HP PA_RISC) */ - case bfd_arch_powerpc: /* EM_CYGNUS_POWERPC */ - return bfd_default_set_arch_mach (abfd, arch, machine); - default: - return false; - } + /* If this isn't the right architecture for this backend, and this + isn't the generic backend, fail. */ + if (arch != get_elf_backend_data (abfd)->arch + && arch != bfd_arch_unknown + && get_elf_backend_data (abfd)->arch != bfd_arch_unknown) + return false; + + return bfd_default_set_arch_mach (abfd, arch, machine); } boolean |