2013-12-17 Niels Möller <nisse@lysator.liu.se>
+ * configure.ac (ASM_RODATA): New substituted variable. Needed for
+ portability to darwin.
+ * config.m4.in: Define RODATA, using configure variable ASM_RODATA
+ * x86_64/gcm-hash8.asm: Use RODATA macro.
+
* bignum-random-prime.c (_nettle_generate_pocklington_prime): Use
stronger variants of Pocklington's theorem, to allow p0 of size
down to bits/3.
define(<ALIGN_LOG>, <@ASM_ALIGN_LOG@>)dnl
define(<ALIGNOF_UINT64_T>, <@ALIGNOF_UINT64_T@>)dnl
define(<W64_ABI>, <@W64_ABI@>)dnl
+define(<RODATA>, <@ASM_RODATA@>)dnl
divert(1)
@ASM_MARK_NOEXEC_STACK@
divert
AC_MSG_WARN([No assembler files found.])
fi
fi
+ case "$host_os" in
+ darwin*)
+ ASM_RODATA='.section __TEXT,__const'
+ ;;
+ *)
+ ASM_RODATA='.section .rodata'
+ ;;
+ esac
fi
AC_SUBST([OPT_ASM_NETTLE_SOURCES])
AC_SUBST([OPT_ASM_HOGWEED_SOURCES])
+AC_SUBST([ASM_RODATA])
AH_VERBATIM([HAVE_NATIVE],
[/* Define to 1 each of the following for which a native (ie. CPU specific)
EPILOGUE(_nettle_gcm_hash8)
define(<W>, <0x$2$1>)
- .section .rodata
+ RODATA
ALIGN(2)
.Lshift_table:
.short W(00,00),W(01,c2),W(03,84),W(02,46),W(07,08),W(06,ca),W(04,8c),W(05,4e)