aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-03-22 09:08:51 +0100
committerJan Beulich <jbeulich@suse.com>2024-03-22 09:08:51 +0100
commit820a77554e64dd26d8ec2b03b59846268730c8be (patch)
tree56e12b4adb9caf8c01c1d7c6d3c5673280646204
parent40dcb60affd6079d1d67351bd498e545405b2ed8 (diff)
downloadgdb-820a77554e64dd26d8ec2b03b59846268730c8be.zip
gdb-820a77554e64dd26d8ec2b03b59846268730c8be.tar.gz
gdb-820a77554e64dd26d8ec2b03b59846268730c8be.tar.bz2
x86: fix Solaris testsuite failures
For one 0afc614c9938 ("x86: Warn .insn instruction with length > 15 bytes") introduced a .insn use involving a slash; such tests need to have --divide passed to gas. And then 5bc71c2a6b8e ("x86-64: Add R_X86_64_CODE_6_GOTTPOFF") broke BFD_RELOC_X86_64_GOTTPOFF conversion to R_X86_64_CODE_4_GOTTPOFF, by adding respective code in a section guarded by generate_relax_relocations (the case of that not being required there was limited to 32-bit object files). Re-arrange that block of code to check generate_relax_relocations later.
-rw-r--r--gas/config/tc-i386.c9
-rw-r--r--gas/testsuite/gas/i386/x86-64.exp2
2 files changed, 4 insertions, 7 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 735c59b..6d35c87 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -12161,10 +12161,6 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
instructions without data prefix. Always generate
R_386_GOT32X for "sym*GOT" operand in 32-bit mode. */
if (i.prefix[DATA_PREFIX] == 0
- && (generate_relax_relocations
- || (!object_64bit
- && i.rm.mode == 0
- && i.rm.regmem == 5))
&& (i.rm.mode == 2
|| (i.rm.mode == 0 && i.rm.regmem == 5))
&& i.tm.opcode_space == SPACE_BASE
@@ -12184,7 +12180,7 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
if (is_apx_rex2_encoding ())
fixP->fx_tcbit = 1;
}
- else
+ else if (generate_relax_relocations)
{
/* Set fx_tcbit3 for REX2 prefix. */
if (is_apx_rex2_encoding ())
@@ -12195,7 +12191,8 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
fixP->fx_tcbit = 1;
}
}
- else
+ else if (generate_relax_relocations
+ || (i.rm.mode == 0 && i.rm.regmem == 5))
fixP->fx_tcbit2 = 1;
}
}
diff --git a/gas/testsuite/gas/i386/x86-64.exp b/gas/testsuite/gas/i386/x86-64.exp
index f5a9209..71364d4 100644
--- a/gas/testsuite/gas/i386/x86-64.exp
+++ b/gas/testsuite/gas/i386/x86-64.exp
@@ -166,7 +166,7 @@ run_list_test "suffix-bad"
run_list_test "x86-64-suffix-bad"
run_list_test "unspec64" ""
run_list_test "prefix64" "-al"
-run_list_test "oversized64" "-al"
+run_list_test "oversized64" "-al --divide"
run_dump_test "x86-64-fxsave"
run_dump_test "x86-64-fxsave-intel"
run_dump_test "x86-64-arch-1"