1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

crypt: Use internal names for the SHA-2 block functions

These functions are externally visible with a static libcrypt
library.
This commit is contained in:
Florian Weimer
2016-10-28 21:47:44 +02:00
parent b2fea743ab
commit 09472915dd
7 changed files with 42 additions and 30 deletions

View File

@ -1,12 +1,12 @@
#include <sparc-ifunc.h>
#define sha512_process_block sha512_process_block_generic
extern void sha512_process_block_generic (const void *buffer, size_t len,
struct sha512_ctx *ctx);
#define __sha512_process_block __sha512_process_block_generic
extern void __sha512_process_block_generic (const void *buffer, size_t len,
struct sha512_ctx *ctx);
#include <crypt/sha512-block.c>
#undef sha512_process_block
#undef __sha512_process_block
extern void __sha512_process_block_crop (const void *buffer, size_t len,
struct sha512_ctx *ctx);
@ -25,6 +25,8 @@ static bool cpu_supports_sha512(int hwcap)
return false;
}
extern void sha512_process_block (const void *buffer, size_t len,
struct sha512_ctx *ctx);
sparc_libc_ifunc(sha512_process_block, cpu_supports_sha512(hwcap) ? __sha512_process_block_crop : sha512_process_block_generic);
extern void __sha512_process_block (const void *buffer, size_t len,
struct sha512_ctx *ctx);
sparc_libc_ifunc (__sha512_process_block,
cpu_supports_sha512(hwcap) ? __sha512_process_block_crop
: __sha512_process_block_generic);