aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-11-17 11:21:13 +0100
committerJan Beulich <jbeulich@suse.com>2023-11-17 11:21:13 +0100
commited049bd6d8108f0e762c58b9c90334ea1f2cb0e9 (patch)
treea1cd8fcde70a3d8281346078b59a6d2dc2c88ffa /gas
parent071c5d81c7681fd92189c380e14266054f0c6c41 (diff)
downloadgdb-ed049bd6d8108f0e762c58b9c90334ea1f2cb0e9.zip
gdb-ed049bd6d8108f0e762c58b9c90334ea1f2cb0e9.tar.gz
gdb-ed049bd6d8108f0e762c58b9c90334ea1f2cb0e9.tar.bz2
x86: use IS_ELF
... instead of (inefficiently) open-coding it.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c5
-rw-r--r--gas/config/tc-i386.h6
2 files changed, 4 insertions, 7 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 1076d51..96065ae 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -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;
}
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 31f2f01..5db2508 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -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