[binutils-gdb] Fix compile time error introduced by d774bf9b3623239a1cfa729afcf048a15da657d3 for non-ELF x86 target
Nick Clifton
nickc@sourceware.org
Mon Sep 23 11:27:35 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9923d668942ff29ce25fc4db460d0e0c4bbae1aa
commit 9923d668942ff29ce25fc4db460d0e0c4bbae1aa
Author: Nick Clifton <nickc@redhat.com>
Date: Mon Sep 23 12:27:29 2024 +0100
Fix compile time error introduced by d774bf9b3623239a1cfa729afcf048a15da657d3 for non-ELF x86 targets
Diff:
---
gas/config/tc-i386.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 864a38a9a20..de15872b5bd 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -6487,12 +6487,15 @@ x86_check_tls_relocation (enum bfd_reloc_code_real r_type)
if (i.base_reg->reg_num != RegIP
|| !i.base_reg->reg_type.bitfield.qword)
return x86_tls_error_rip;
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
if (x86_elf_abi == X86_64_ABI)
{
if (!i.op[1].regs->reg_type.bitfield.qword)
return x86_tls_error_dest_64bit_reg_size;
}
- else if (!i.op[1].regs->reg_type.bitfield.dword
+ else
+#endif
+ if (!i.op[1].regs->reg_type.bitfield.dword
&& !i.op[1].regs->reg_type.bitfield.qword)
return x86_tls_error_dest_32bit_or_64bit_reg_size;
break;
@@ -6594,12 +6597,15 @@ x86_check_tls_relocation (enum bfd_reloc_code_real r_type)
if (i.base_reg->reg_num != RegIP
|| !i.base_reg->reg_type.bitfield.qword)
return x86_tls_error_rip;
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
if (x86_elf_abi == X86_64_ABI)
{
if (!i.op[i.operands - 1].regs->reg_type.bitfield.qword)
return x86_tls_error_dest_64bit_reg_size;
}
- else if (!i.op[i.operands - 1].regs->reg_type.bitfield.dword
+ else
+#endif
+ if (!i.op[i.operands - 1].regs->reg_type.bitfield.dword
&& !i.op[i.operands - 1].regs->reg_type.bitfield.qword)
return x86_tls_error_dest_32bit_or_64bit_reg_size;
break;
More information about the Binutils-cvs
mailing list