Skip to content

Commit

Permalink
Fix for link error on macOS. (RustCrypto#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter authored and newpavlov committed May 15, 2018
1 parent 3f11171 commit 269de57
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 0 deletions.
5 changes: 5 additions & 0 deletions md5/src/x64.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@


/* void md5_compress(uint32_t state[4], const uint8_t block[64]) */
#ifdef __APPLE__
.globl _md5_compress
_md5_compress:
#else
.globl md5_compress
md5_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions md5/src/x86.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@


/* void md5_compress(uint32_t state[4], const uint8_t block[64]) */
#ifdef __APPLE__
.globl _md5_compress
_md5_compress:
#else
.globl md5_compress
md5_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions sha1/src/x64.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@


/* void sha1_compress(uint32_t state[5], const uint8_t block[64]) */
#ifdef __APPLE__
.globl _sha1_compress
_sha1_compress:
#else
.globl sha1_compress
sha1_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions sha1/src/x86.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@


/* void sha1_compress(uint32_t state[5], const uint8_t block[64]) */
#ifdef __APPLE__
.globl _sha1_compress
_sha1_compress:
#else
.globl sha1_compress
sha1_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions sha2/src/sha256_x64.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@


/* void sha256_compress(uint32_t state[8], const uint8_t block[64]) */
#ifdef __APPLE__
.globl _sha256_compress
_sha256_compress:
#else
.globl sha256_compress
sha256_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions sha2/src/sha256_x86.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@


/* void sha256_compress(uint32_t state[8], const uint8_t block[64]) */
#ifdef __APPLE__
.globl _sha256_compress
_sha256_compress:
#else
.globl sha256_compress
sha256_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions sha2/src/sha512_x64.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@


/* void sha512_compress(uint64_t state[8], const uint8_t block[128]) */
#ifdef __APPLE__
.globl _sha512_compress
_sha512_compress:
#else
.globl sha512_compress
sha512_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions sha2/src/sha512_x86.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@


/* void sha512_compress(uint64_t state[8], const uint8_t block[128]) */
#ifdef __APPLE__
.globl _sha512_compress
_sha512_compress:
#else
.globl sha512_compress
sha512_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions whirlpool/src/x64.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@

/* void whirlpool_compress(uint8_t state[64], const uint8_t block[64]) */
/* state and block can be optionally aligned to 8 bytes for slightly better performance. */
#ifdef __APPLE__
.globl _whirlpool_compress
_whirlpool_compress:
#else
.globl whirlpool_compress
whirlpool_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down
5 changes: 5 additions & 0 deletions whirlpool/src/x86.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@

/* void whirlpool_compress(uint8_t state[64], const uint8_t block[64]) */
/* state and block can be optionally aligned to 8 bytes for slightly better performance. */
#ifdef __APPLE__
.globl _whirlpool_compress
_whirlpool_compress:
#else
.globl whirlpool_compress
whirlpool_compress:
#endif
/*
* Storage usage:
* Bytes Location Description
Expand Down

0 comments on commit 269de57

Please sign in to comment.