Skip to content

Commit

Permalink
Fix compile of crc32-pclmul_asm on macOS (madler#8)
Browse files Browse the repository at this point in the history
* .type and .size are ELF/COFF specific so drop them
* .globl + .hidden equivalent for macOS is .private_extern
* symbol name are not mangled on macOS, so we need to prefix _
  • Loading branch information
felixbuenemann authored and vkrasnov committed May 27, 2018
1 parent 634a6b9 commit 0c6bb2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions contrib/amd64/crc32-pclmul_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
* - prepend '$' to some immediate operands to make assembler happy.
*/

#ifdef __APPLE__
#define ENTRY(name) \
.private_extern _ ## name; \
_ ## name:

#define ENDPROC(name)
#else
#define ENTRY(name) \
.globl name; \
.hidden name; \
Expand All @@ -52,6 +59,7 @@ name:

#define ENDPROC(name) \
.size name, .-name
#endif

.align 16
/*
Expand Down

0 comments on commit 0c6bb2b

Please sign in to comment.