Add an empty assembly statement to the memzero() weak symbol

This commit is contained in:
Frank Denis 2017-11-11 17:31:22 +01:00
parent 40070b342a
commit 27872ca13c

View File

@ -92,6 +92,9 @@ sodium_memzero(void *const pnt, const size_t len)
#elif HAVE_WEAK_SYMBOLS
memset(pnt, 0, len);
_sodium_dummy_symbol_to_prevent_memzero_lto(pnt, len);
# ifdef HAVE_AMD64_ASM
__asm__ __volatile__ ("" : : "p"(pnt));
# endif
#else
volatile unsigned char *volatile pnt_ =
(volatile unsigned char *volatile) pnt;