]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: use IS_ELF
authorJan Beulich <jbeulich@suse.com>
Fri, 17 Nov 2023 10:21:13 +0000 (11:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Nov 2023 10:21:13 +0000 (11:21 +0100)
... instead of (inefficiently) open-coding it.

gas/config/tc-i386.c
gas/config/tc-i386.h

index 1076d51bc7d4307a86e0da8f3db994fc6156e2c7..96065ae3b71cc41c33cbb99d88a0e7d786101923 100644 (file)
@@ -3063,8 +3063,7 @@ i386_arch (void)
 {
   if (cpu_arch_isa == PROCESSOR_IAMCU)
     {
-      if (OUTPUT_FLAVOR != bfd_target_elf_flavour
-         || flag_code == CODE_64BIT)
+      if (!IS_ELF || flag_code == CODE_64BIT)
        as_fatal (_("Intel MCU is 32bit ELF only"));
       return bfd_arch_iamcu;
     }
@@ -3087,7 +3086,7 @@ i386_mach (void)
     {
       if (cpu_arch_isa == PROCESSOR_IAMCU)
        {
-         if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+         if (!IS_ELF)
            as_fatal (_("Intel MCU is 32bit ELF only"));
          return bfd_mach_i386_iamcu;
        }
index 31f2f015c74f174b001519bd40f58db12befc686..5db25087290a7e451beea983de676db76a12fe5f 100644 (file)
@@ -154,11 +154,9 @@ extern int tc_i386_fix_adjustable (struct fix *);
 /* ELF wants external syms kept, as does PE COFF.  */
 #if defined (TE_PE) && defined (STRICT_PE_FORMAT)
 #define EXTERN_FORCE_RELOC                             \
-  (OUTPUT_FLAVOR == bfd_target_elf_flavour             \
-   || OUTPUT_FLAVOR == bfd_target_coff_flavour)
+  (IS_ELF || OUTPUT_FLAVOR == bfd_target_coff_flavour)
 #else
-#define EXTERN_FORCE_RELOC                             \
-  (OUTPUT_FLAVOR == bfd_target_elf_flavour)
+#define EXTERN_FORCE_RELOC     IS_ELF
 #endif
 
 /* This expression evaluates to true if the relocation is for a local