]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: Fix uninitialized c64 member of aarch64_fix struct
authorAlex Coplan <alex.coplan@arm.com>
Tue, 13 Jul 2021 16:20:22 +0000 (17:20 +0100)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 1 Sep 2022 22:59:24 +0000 (15:59 -0700)
The c64 flag in the aarch64_fix struct was missing an initialization.
This was causing Morello relocations to be spuriously inserted, even
when not targeting C64.

This patch fixes the issue by initializing the flag to false.

gas/ChangeLog:

2021-07-13  Alex Coplan  <alex.coplan@arm.com>

* config/tc-aarch64.h (TC_INIT_FIX_DATA): Initialize c64
member.

gas/ChangeLog
gas/config/tc-aarch64.h

index bdbf538e69171da8faa1710d59aa3c73ff7b1774..7f45df6e85d5bc877a1b5f303d53d14391fc45cf 100644 (file)
@@ -1,3 +1,8 @@
+2021-07-13  Alex Coplan  <alex.coplan@arm.com>
+
+       * config/tc-aarch64.h (TC_INIT_FIX_DATA): Initialize c64
+       member.
+
 2020-10-20  Siddhesh Poyarekar  <siddesh.poyarekar@arm.com>
 
        * config/tc-aarch64.c (s_tlsdesccall): Emit Morello
index 9e68ed235f4b3c7a61e5331d242f3e480fcb8e23..632c9456f251684b2df2d87cef46b1144d784cfa 100644 (file)
@@ -133,8 +133,11 @@ struct eh_entry_extras
     while (0);
 
 #define TC_FIX_TYPE struct aarch64_fix
-#define TC_INIT_FIX_DATA(FIX) { (FIX)->tc_fix_data.inst = NULL;        \
-    (FIX)->tc_fix_data.opnd = AARCH64_OPND_NIL; }
+#define TC_INIT_FIX_DATA(FIX) { \
+    (FIX)->tc_fix_data.inst = NULL;    \
+    (FIX)->tc_fix_data.opnd = AARCH64_OPND_NIL; \
+    (FIX)->tc_fix_data.c64 = FALSE; \
+}
 
 #define TC_SYMFIELD_TYPE       unsigned int
 #define AARCH64_GET_FLAG(s)    (*symbol_get_tc (s))