]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crc32: label assembler functions without leading underscore
authorKefu Chai <kchai@redhat.com>
Wed, 13 Sep 2017 03:09:49 +0000 (11:09 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Sep 2017 02:43:32 +0000 (10:43 +0800)
clang onder osx adds leading undescore to the function names to be
ABI compatible. but the assembly code does not do so. so we need to
control the name using gcc/clang extension. see
https://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Asm-Labels.html#Asm-Labels

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/crc32c_intel_fast.c

index adaf3d7779e2baf47c1015abb2961c2e41084d4c..4a3bfc930e5e9919968d396cc26bf063d2b26bb4 100644 (file)
@@ -1,8 +1,8 @@
 #include "acconfig.h"
 #include "common/crc32c_intel_baseline.h"
 
-extern unsigned int crc32_iscsi_00(unsigned char const *buffer, int len, unsigned int crc);
-extern unsigned int crc32_iscsi_zero_00(unsigned char const *buffer, int len, unsigned int crc);
+extern unsigned int crc32_iscsi_00(unsigned char const *buffer, int len, unsigned int crc) asm("crc32_iscsi_00");
+extern unsigned int crc32_iscsi_zero_00(unsigned char const *buffer, int len, unsigned int crc) asm("crc32_iscsi_zero_00");
 
 #ifdef HAVE_GOOD_YASM_ELF64