]> 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)
committerAlex Coplan <alex.coplan@arm.com>
Tue, 13 Jul 2021 16:20:22 +0000 (17:20 +0100)
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 7f41ff756b618250e86c5d073532939ac1d58fce..7a09f844952f14ed7ebbbaa4b06e0c2cc7110c92 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 cd9740c7e90b31a8cf8595b0329ea8c1977ba1e1..88f5a4fe16a671436bb7d8e3b8a65fad94cc584d 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))