Fix x86-64: Add R_X86_64_CODE_4_GOTPCRELX

Message ID 20231229204311.186432-1-hjl.tools@gmail.com
State Accepted
Headers
Series Fix x86-64: Add R_X86_64_CODE_4_GOTPCRELX |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

H.J. Lu Dec. 29, 2023, 8:43 p.m. UTC
  commit 3d5a60de52556f6a53d71d7e607c6696450ae3e4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jun 8 10:01:03 2023 -0700

    x86-64: Add R_X86_64_CODE_4_GOTPCRELX

added a new field, fx_tcbit3, to fix.  But it didn't initialize it.
Fix it by clearing it in fix_new_internal.

	* wrtite.c (fix_new_internal): Clear fx_tcbit3.
---
 gas/write.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Alan Modra Dec. 29, 2023, 11:04 p.m. UTC | #1
There are these fails too:
x86_64-cloudabi  +FAIL: x86-64 EVEX-promoted bad
x86_64-rdos  +FAIL: x86-64 EVEX-promoted bad
x86_64-w64-mingw32  +FAIL: x86_64 APX_F pushp popp insns
x86_64-w64-mingw32  +FAIL: x86_64 APX_F pushp popp insns (Intel disassembly)
x86_64-w64-mingw32  +FAIL: x86-64 EVEX-promoted bad
x86_64-w64-mingw32  +FAIL: x86-64 APX NDD instructions with evex prefix encoding
x86_64-w64-mingw32  +FAIL: x86-64 APX NDD optimized encoding
  
H.J. Lu Dec. 29, 2023, 11:52 p.m. UTC | #2
On Fri, Dec 29, 2023 at 3:04 PM Alan Modra <amodra@gmail.com> wrote:
>
> There are these fails too:
> x86_64-cloudabi  +FAIL: x86-64 EVEX-promoted bad
> x86_64-rdos  +FAIL: x86-64 EVEX-promoted bad

Fixed by

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=2eda6e3ecdd0ea93586a532d9464e430f708334a

> x86_64-w64-mingw32  +FAIL: x86_64 APX_F pushp popp insns
> x86_64-w64-mingw32  +FAIL: x86_64 APX_F pushp popp insns (Intel disassembly)
> x86_64-w64-mingw32  +FAIL: x86-64 EVEX-promoted bad
> x86_64-w64-mingw32  +FAIL: x86-64 APX NDD instructions with evex prefix encoding
> x86_64-w64-mingw32  +FAIL: x86-64 APX NDD optimized encoding

Fixed by

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=302a296de0e83d6c320cc0f0d5dd1a1d73182009

Thanks.
  

Patch

diff --git a/gas/write.c b/gas/write.c
index 20ba3f8bd84..5612b401f46 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -169,6 +169,7 @@  fix_new_internal (fragS *frag,		/* Which frag?  */
   fixP->fx_addnumber = 0;
   fixP->fx_tcbit = 0;
   fixP->fx_tcbit2 = 0;
+  fixP->fx_tcbit3 = 0;
   fixP->fx_done = 0;
   fixP->fx_no_overflow = 0;
   fixP->fx_signed = 0;