summaryrefslogtreecommitdiff
path: root/cipher/asm-common-aarch64.h
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/asm-common-aarch64.h')
-rw-r--r--cipher/asm-common-aarch64.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/cipher/asm-common-aarch64.h b/cipher/asm-common-aarch64.h
index b38b17a6..8e8bf8e7 100644
--- a/cipher/asm-common-aarch64.h
+++ b/cipher/asm-common-aarch64.h
@@ -29,8 +29,17 @@
# define ELF(...) /*_*/
#endif
-#define GET_LOCAL_POINTER(reg, label) \
- adr reg, label;
+#define SECTION_RODATA .section .rodata
+
+#ifdef __APPLE__
+#define GET_DATA_POINTER(reg, name) \
+ adrp reg, name@GOTPAGE ; \
+ add reg, reg, name@GOTPAGEOFF ;
+#else
+#define GET_DATA_POINTER(reg, name) \
+ adrp reg, name ; \
+ add reg, reg, #:lo12:name ;
+#endif
#ifdef HAVE_GCC_ASM_CFI_DIRECTIVES
/* CFI directives to emit DWARF stack unwinding information. */