1 From 3065c530d3aa50c2b5ee9c01f88a9c0b61732805 Mon Sep 17 00:00:00 2001
2 From: Ivan Tadeu Ferreira Antunes Filho <antunesi@google.com>
3 Date: Mon, 16 Sep 2024 16:10:39 -0400
4 Subject: [PATCH] Move cfi_startproc after CNAME(label)
6 This is a fix for https://github.com/libffi/libffi/issues/852: error: invalid CFI advance_loc expression on apple targets.
8 The CFI for darwin arm64 was broken because the CNAME macro was being used after the
11 src/aarch64/sysv.S | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
14 diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S
15 index 6a9a5611f..e83bc65de 100644
16 --- a/src/aarch64/sysv.S
17 +++ b/src/aarch64/sysv.S
18 @@ -89,8 +89,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
27 /* Sign the lr with x1 since that is the CFA which is the modifer used in auth instructions */
28 @@ -348,8 +348,8 @@ CNAME(ffi_closure_SYSV_V):
33 CNAME(ffi_closure_SYSV):
38 @@ -647,8 +647,8 @@ CNAME(ffi_go_closure_SYSV_V):
43 CNAME(ffi_go_closure_SYSV):