From 54ea778f74c98d7b934fc1726ec3120c392649cb Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 28 Nov 2021 19:44:27 +0000 Subject: [PATCH] aarch64, Darwin: Account for UNSPEC_SALT_ADDR in symbol output. We were omitting the postfix relocation indicator because the code was falling back to the default output when a symbol was wrapped in an unspec SALT_ADDR. fixes issue #54. Signed-off-by: Iain Sandoe --- gcc/config/aarch64/aarch64.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 4dc0dcb378f4..2d27c2caefb3 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -11377,6 +11377,13 @@ output_macho_postfix_expr (FILE *file, rtx x, const char *postfix) output_addr_const (file, XEXP (x, 0)); break; + case UNSPEC: + if (XINT (x, 1) == UNSPEC_SALT_ADDR) + { + output_macho_postfix_expr (file, XVECEXP (x, 0, 0), postfix); + break; + } + /* FALLTHROUGH */ default: if (targetm.asm_out.output_addr_const_extra (file, x)) break;