]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Added nettle_ prefix to memxor symbols.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 24 Apr 2013 20:43:40 +0000 (22:43 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 24 Apr 2013 20:43:40 +0000 (22:43 +0200)
ChangeLog
arm/memxor.asm
memxor.h
testsuite/symbols-test
x86_64/memxor.asm

index d53197fd616c1e5711fcf425dfb967112d829eec..cd6583a37c35bf2b698adbbab6f89ffc38eb365e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2013-04-24  Niels Möller  <nisse@lysator.liu.se>
 
+       * x86_64/memxor.asm: Added nettle_ prefix to symbols.
+       * arm/memxor.asm: Likewise.
+
+       * testsuite/symbols-test: Don't allow memxor functions without
+       nettle prefix,
+
+       * memxor.h (memxor3): Added name mangling to add "nettle_" prefix
+       to memxor and memxor3 symbols.
+
        * Makefile.in (nettle_OBJS): Deleted $(LIBOBJS), and also deleted
        LIBOBJS substitution.
        (nettle_SOURCES): Added memxor.c, to include it in the library
index 33f672c6d641f8213a0c22f146dbf8af87174162..b69e2f43f449eed6d4243d6a934880335e3ec66f 100644 (file)
@@ -41,7 +41,7 @@ define(<TNC>, <r12>)
 
        C memxor(uint8_t *dst, const uint8_t *src, size_t n)
        .align 4
-PROLOGUE(memxor)
+PROLOGUE(nettle_memxor)
        cmp     N, #0
        beq     .Lmemxor_done
 
@@ -214,7 +214,7 @@ PROLOGUE(memxor)
        beq     .Lmemxor_done
        b       .Lmemxor_bytes
        
-EPILOGUE(memxor)
+EPILOGUE(nettle_memxor)
 
 define(<DST>, <r0>)
 define(<AP>, <r1>)
@@ -231,7 +231,7 @@ define(<BTNC>, <r12>)
 
        C memxor3(uint8_t *dst, const uint8_t *a, const uint8_t *b, size_t n)
        .align 2
-PROLOGUE(memxor3)
+PROLOGUE(nettle_memxor3)
        cmp     N, #0
        beq     .Lmemxor3_ret
 
@@ -485,4 +485,4 @@ PROLOGUE(memxor3)
        add     AP, AP, ACNT, lsr #3
        add     BP, BP, BCNT, lsr #3
        b       .Lmemxor3_bytes
-EPILOGUE(memxor3)
+EPILOGUE(nettle_memxor3)
index c9e563d496be73fa5a5622f4aaf15cb2cfab0be7..2a6545cef79598c03b3a270785b65a27daa9033a 100644 (file)
--- a/memxor.h
+++ b/memxor.h
 extern "C" {
 #endif
 
+/* Name mangling */
+#define memxor nettle_memxor
+#define memxor3 nettle_memxor3
+
 uint8_t *memxor(uint8_t *dst, const uint8_t *src, size_t n);
 uint8_t *memxor3(uint8_t *dst, const uint8_t *a, const uint8_t *b, size_t n);
 
index ec8f49183abf574d59d9e807c1a1654dceb90989..4a97c25e395f74598ef450c5dd9467bd4a147616 100755 (executable)
@@ -17,7 +17,7 @@ fi
 #   code.
 
 ( $NM -g ../libnettle.a || $NM ../libnettle.a ) \
-    | grep ' [DRT] ' | egrep -v '( |^)\.?_?(_?nettle_|memxor)|get_pc_thunk' \
+    | grep ' [DRT] ' | egrep -v '( |^)\.?_?(_?nettle_)|get_pc_thunk' \
     | sort -k3 > test1.out
 
 if [ -s test1.out ] ; then
index b22a4721bc74d91e95a60078bcb77d795e4ae5f1..2ac9df97e2588bb1bf10b3fd496286f13660a370 100644 (file)
@@ -38,18 +38,18 @@ define(<USE_SSE2>, <no>)
        C                 %rdi               %rsi      %rdx
        ALIGN(16)
 
-PROLOGUE(memxor)
+PROLOGUE(nettle_memxor)
        W64_ENTRY(3, 0)
        mov     %rdx, %r10
        mov     %rdi, %rdx
        jmp     .Lmemxor3_entry
-EPILOGUE(memxor)
+EPILOGUE(nettle_memxor)
 
        C memxor3(uint8_t *dst, const uint8_t *a, const uint8_t *b, size_t n)
        C                 %rdi              %rsi              %rdx      %rcx
        ALIGN(16)
        
-PROLOGUE(memxor3)
+PROLOGUE(nettle_memxor3)
        W64_ENTRY(4, 0)
        C %cl needed for shift count, so move away N
        mov     %rcx, N
@@ -258,4 +258,4 @@ ifelse(USE_SSE2, yes, <
 >)     
        
 
-EPILOGUE(memxor3)
+EPILOGUE(nettle_memxor3)