From 059cd0884c868fb95adfcc8bd140ea6d84ae9e8a Mon Sep 17 00:00:00 2001 From: Alex Coplan Date: Tue, 13 Jul 2021 17:20:22 +0100 Subject: [PATCH] gas: Fix uninitialized c64 member of aarch64_fix struct 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 * config/tc-aarch64.h (TC_INIT_FIX_DATA): Initialize c64 member. --- gas/ChangeLog | 5 +++++ gas/config/tc-aarch64.h | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index bdbf538e691..7f45df6e85d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2021-07-13 Alex Coplan + + * config/tc-aarch64.h (TC_INIT_FIX_DATA): Initialize c64 + member. + 2020-10-20 Siddhesh Poyarekar * config/tc-aarch64.c (s_tlsdesccall): Emit Morello diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h index 9e68ed235f4..632c9456f25 100644 --- a/gas/config/tc-aarch64.h +++ b/gas/config/tc-aarch64.h @@ -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)) -- 2.47.2