--- gnutls-3.0.15/lib/accelerated/x86/asm/appro-aes-x86-64.s.orig	2012-03-14 21:31:28.000000000 -0400
+++ gnutls-3.0.15/lib/accelerated/x86/asm/appro-aes-x86-64.s	2012-03-14 21:48:46.000000000 -0400
@@ -35,11 +35,29 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef __MACH__
+#  define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
+#  define SYM(x) x
+#endif
+
+#ifdef __ELF__
+#  define TYPEF(x) .type SYM(x), @function
+#  define SIZE(x) .size SYM(x), . - SYM(x)
+#else
+#  define TYPEF(x)
+#  define SIZE(x)
+#endif
+
 .text	
-.globl	aesni_encrypt
-.type	aesni_encrypt,@function
-.align	16
-aesni_encrypt:
+.globl	SYM(aesni_encrypt)
+TYPEF(aesni_encrypt)
+.balign	16
+
+SYM(aesni_encrypt):
 	movups	(%rdi),%xmm2
 	movl	240(%rdx),%eax
 	movups	(%rdx),%xmm0
@@ -55,12 +73,12 @@
 .byte	102,15,56,221,209
 	movups	%xmm2,(%rsi)
 	.byte	0xf3,0xc3
-.size	aesni_encrypt,.-aesni_encrypt
+	SIZE(aesni_encrypt)
 
-.globl	aesni_decrypt
-.type	aesni_decrypt,@function
-.align	16
-aesni_decrypt:
+.globl	SYM(aesni_decrypt)
+TYPEF(aesni_decrypt)
+.balign	16
+SYM(aesni_decrypt):
 	movups	(%rdi),%xmm2
 	movl	240(%rdx),%eax
 	movups	(%rdx),%xmm0
@@ -76,9 +94,9 @@
 .byte	102,15,56,223,209
 	movups	%xmm2,(%rsi)
 	.byte	0xf3,0xc3
-.size	aesni_decrypt, .-aesni_decrypt
-.type	_aesni_encrypt3,@function
-.align	16
+SIZE(aesni_decrypt)
+TYPEF(_aesni_encrypt3)
+.balign	16
 _aesni_encrypt3:
 	movups	(%rcx),%xmm0
 	shrl	$1,%eax
@@ -109,9 +127,9 @@
 .byte	102,15,56,221,216
 .byte	102,15,56,221,224
 	.byte	0xf3,0xc3
-.size	_aesni_encrypt3,.-_aesni_encrypt3
-.type	_aesni_decrypt3,@function
-.align	16
+SIZE(_aesni_encrypt3)
+TYPEF(_aesni_decrypt3)
+.balign	16
 _aesni_decrypt3:
 	movups	(%rcx),%xmm0
 	shrl	$1,%eax
@@ -142,9 +160,9 @@
 .byte	102,15,56,223,216
 .byte	102,15,56,223,224
 	.byte	0xf3,0xc3
-.size	_aesni_decrypt3,.-_aesni_decrypt3
-.type	_aesni_encrypt4,@function
-.align	16
+SIZE(_aesni_decrypt3)
+TYPEF(_aesni_encrypt4)
+.balign	16
 _aesni_encrypt4:
 	movups	(%rcx),%xmm0
 	shrl	$1,%eax
@@ -180,9 +198,9 @@
 .byte	102,15,56,221,224
 .byte	102,15,56,221,232
 	.byte	0xf3,0xc3
-.size	_aesni_encrypt4,.-_aesni_encrypt4
-.type	_aesni_decrypt4,@function
-.align	16
+SIZE(_aesni_encrypt4)
+TYPEF(_aesni_decrypt4)
+.balign	16
 _aesni_decrypt4:
 	movups	(%rcx),%xmm0
 	shrl	$1,%eax
@@ -218,9 +236,9 @@
 .byte	102,15,56,223,224
 .byte	102,15,56,223,232
 	.byte	0xf3,0xc3
-.size	_aesni_decrypt4,.-_aesni_decrypt4
-.type	_aesni_encrypt6,@function
-.align	16
+SIZE(_aesni_decrypt4)
+TYPEF(_aesni_encrypt6)
+.balign	16
 _aesni_encrypt6:
 	movups	(%rcx),%xmm0
 	shrl	$1,%eax
@@ -241,7 +259,7 @@
 	movups	(%rcx),%xmm0
 .byte	102,15,56,220,249
 	jmp	.Lenc_loop6_enter
-.align	16
+.balign	16
 .Lenc_loop6:
 .byte	102,15,56,220,209
 .byte	102,15,56,220,217
@@ -275,9 +293,9 @@
 .byte	102,15,56,221,240
 .byte	102,15,56,221,248
 	.byte	0xf3,0xc3
-.size	_aesni_encrypt6,.-_aesni_encrypt6
-.type	_aesni_decrypt6,@function
-.align	16
+SIZE(_aesni_encrypt6)
+TYPEF(_aesni_decrypt6)
+.balign	16
 _aesni_decrypt6:
 	movups	(%rcx),%xmm0
 	shrl	$1,%eax
@@ -298,7 +316,7 @@
 	movups	(%rcx),%xmm0
 .byte	102,15,56,222,249
 	jmp	.Ldec_loop6_enter
-.align	16
+.balign	16
 .Ldec_loop6:
 .byte	102,15,56,222,209
 .byte	102,15,56,222,217
@@ -332,9 +350,9 @@
 .byte	102,15,56,223,240
 .byte	102,15,56,223,248
 	.byte	0xf3,0xc3
-.size	_aesni_decrypt6,.-_aesni_decrypt6
-.type	_aesni_encrypt8,@function
-.align	16
+SIZE(_aesni_decrypt6)
+TYPEF(_aesni_encrypt8)
+.balign	16
 _aesni_encrypt8:
 	movups	(%rcx),%xmm0
 	shrl	$1,%eax
@@ -360,7 +378,7 @@
 .byte	102,68,15,56,220,201
 	movups	16(%rcx),%xmm1
 	jmp	.Lenc_loop8_enter
-.align	16
+.balign	16
 .Lenc_loop8:
 .byte	102,15,56,220,209
 .byte	102,15,56,220,217
@@ -402,9 +420,9 @@
 .byte	102,68,15,56,221,192
 .byte	102,68,15,56,221,200
 	.byte	0xf3,0xc3
-.size	_aesni_encrypt8,.-_aesni_encrypt8
-.type	_aesni_decrypt8,@function
-.align	16
+SIZE(_aesni_encrypt8)
+TYPEF(_aesni_decrypt8)
+.balign	16
 _aesni_decrypt8:
 	movups	(%rcx),%xmm0
 	shrl	$1,%eax
@@ -430,7 +448,7 @@
 .byte	102,68,15,56,222,201
 	movups	16(%rcx),%xmm1
 	jmp	.Ldec_loop8_enter
-.align	16
+.balign	16
 .Ldec_loop8:
 .byte	102,15,56,222,209
 .byte	102,15,56,222,217
@@ -472,11 +490,11 @@
 .byte	102,68,15,56,223,192
 .byte	102,68,15,56,223,200
 	.byte	0xf3,0xc3
-.size	_aesni_decrypt8,.-_aesni_decrypt8
-.globl	aesni_ecb_encrypt
-.type	aesni_ecb_encrypt,@function
-.align	16
-aesni_ecb_encrypt:
+SIZE(_aesni_decrypt8)
+.globl	SYM(aesni_ecb_encrypt)
+TYPEF(aesni_ecb_encrypt)
+.balign	16
+SYM(aesni_ecb_encrypt):
 	andq	$-16,%rdx
 	jz	.Lecb_ret
 
@@ -501,7 +519,7 @@
 	leaq	128(%rdi),%rdi
 	subq	$128,%rdx
 	jmp	.Lecb_enc_loop8_enter
-.align	16
+.balign	16
 .Lecb_enc_loop8:
 	movups	%xmm2,(%rsi)
 	movq	%r11,%rcx
@@ -570,7 +588,7 @@
 	movups	%xmm7,80(%rsi)
 	movups	%xmm8,96(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_enc_one:
 	movups	(%rcx),%xmm0
 	movups	16(%rcx),%xmm1
@@ -585,21 +603,21 @@
 .byte	102,15,56,221,209
 	movups	%xmm2,(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_enc_two:
 	xorps	%xmm4,%xmm4
 	call	_aesni_encrypt3
 	movups	%xmm2,(%rsi)
 	movups	%xmm3,16(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_enc_three:
 	call	_aesni_encrypt3
 	movups	%xmm2,(%rsi)
 	movups	%xmm3,16(%rsi)
 	movups	%xmm4,32(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_enc_four:
 	call	_aesni_encrypt4
 	movups	%xmm2,(%rsi)
@@ -607,7 +625,7 @@
 	movups	%xmm4,32(%rsi)
 	movups	%xmm5,48(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_enc_five:
 	xorps	%xmm7,%xmm7
 	call	_aesni_encrypt6
@@ -617,7 +635,7 @@
 	movups	%xmm5,48(%rsi)
 	movups	%xmm6,64(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_enc_six:
 	call	_aesni_encrypt6
 	movups	%xmm2,(%rsi)
@@ -628,7 +646,7 @@
 	movups	%xmm7,80(%rsi)
 	jmp	.Lecb_ret
 
-.align	16
+.balign	16
 .Lecb_decrypt:
 	cmpq	$128,%rdx
 	jb	.Lecb_dec_tail
@@ -644,7 +662,7 @@
 	leaq	128(%rdi),%rdi
 	subq	$128,%rdx
 	jmp	.Lecb_dec_loop8_enter
-.align	16
+.balign	16
 .Lecb_dec_loop8:
 	movups	%xmm2,(%rsi)
 	movq	%r11,%rcx
@@ -715,7 +733,7 @@
 	movups	%xmm7,80(%rsi)
 	movups	%xmm8,96(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_dec_one:
 	movups	(%rcx),%xmm0
 	movups	16(%rcx),%xmm1
@@ -730,21 +748,21 @@
 .byte	102,15,56,223,209
 	movups	%xmm2,(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_dec_two:
 	xorps	%xmm4,%xmm4
 	call	_aesni_decrypt3
 	movups	%xmm2,(%rsi)
 	movups	%xmm3,16(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_dec_three:
 	call	_aesni_decrypt3
 	movups	%xmm2,(%rsi)
 	movups	%xmm3,16(%rsi)
 	movups	%xmm4,32(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_dec_four:
 	call	_aesni_decrypt4
 	movups	%xmm2,(%rsi)
@@ -752,7 +770,7 @@
 	movups	%xmm4,32(%rsi)
 	movups	%xmm5,48(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_dec_five:
 	xorps	%xmm7,%xmm7
 	call	_aesni_decrypt6
@@ -762,7 +780,7 @@
 	movups	%xmm5,48(%rsi)
 	movups	%xmm6,64(%rsi)
 	jmp	.Lecb_ret
-.align	16
+.balign	16
 .Lecb_dec_six:
 	call	_aesni_decrypt6
 	movups	%xmm2,(%rsi)
@@ -774,11 +792,11 @@
 
 .Lecb_ret:
 	.byte	0xf3,0xc3
-.size	aesni_ecb_encrypt,.-aesni_ecb_encrypt
-.globl	aesni_ccm64_encrypt_blocks
-.type	aesni_ccm64_encrypt_blocks,@function
-.align	16
-aesni_ccm64_encrypt_blocks:
+SIZE(aesni_ecb_encrypt)
+.globl	SYM(aesni_ccm64_encrypt_blocks)
+TYPEF(aesni_ccm64_encrypt_blocks)
+.balign	16
+SYM(aesni_ccm64_encrypt_blocks):
 	movl	240(%rcx),%eax
 	movdqu	(%r8),%xmm9
 	movdqa	.Lincrement64(%rip),%xmm6
@@ -791,7 +809,7 @@
 	movl	%eax,%r10d
 .byte	102,68,15,56,0,207
 	jmp	.Lccm64_enc_outer
-.align	16
+.balign	16
 .Lccm64_enc_outer:
 	movups	(%r11),%xmm0
 	movl	%r10d,%eax
@@ -831,11 +849,11 @@
 
 	movups	%xmm3,(%r9)
 	.byte	0xf3,0xc3
-.size	aesni_ccm64_encrypt_blocks,.-aesni_ccm64_encrypt_blocks
-.globl	aesni_ccm64_decrypt_blocks
-.type	aesni_ccm64_decrypt_blocks,@function
-.align	16
-aesni_ccm64_decrypt_blocks:
+SIZE(aesni_ccm64_encrypt_blocks)
+.globl	SYM(aesni_ccm64_decrypt_blocks)
+TYPEF(aesni_ccm64_decrypt_blocks)
+.balign	16
+SYM(aesni_ccm64_decrypt_blocks):
 	movl	240(%rcx),%eax
 	movups	(%r8),%xmm9
 	movdqu	(%r9),%xmm3
@@ -861,7 +879,7 @@
 	paddq	%xmm6,%xmm9
 	leaq	16(%rdi),%rdi
 	jmp	.Lccm64_dec_outer
-.align	16
+.balign	16
 .Lccm64_dec_outer:
 	xorps	%xmm2,%xmm8
 	movdqa	%xmm9,%xmm2
@@ -901,7 +919,7 @@
 .byte	102,15,56,221,216
 	jmp	.Lccm64_dec_outer
 
-.align	16
+.balign	16
 .Lccm64_dec_break:
 
 	movups	(%r11),%xmm0
@@ -918,11 +936,11 @@
 .byte	102,15,56,221,217
 	movups	%xmm3,(%r9)
 	.byte	0xf3,0xc3
-.size	aesni_ccm64_decrypt_blocks,.-aesni_ccm64_decrypt_blocks
-.globl	aesni_ctr32_encrypt_blocks
-.type	aesni_ctr32_encrypt_blocks,@function
-.align	16
-aesni_ctr32_encrypt_blocks:
+SIZE(aesni_ccm64_decrypt_blocks)
+.globl	SYM(aesni_ctr32_encrypt_blocks)
+TYPEF(aesni_ctr32_encrypt_blocks)
+.balign	16
+SYM(aesni_ctr32_encrypt_blocks):
 	cmpq	$1,%rdx
 	je	.Lctr32_one_shortcut
 
@@ -963,7 +981,7 @@
 	subq	$6,%rdx
 	jmp	.Lctr32_loop6
 
-.align	16
+.balign	16
 .Lctr32_loop6:
 	pshufd	$192,%xmm13,%xmm5
 	por	%xmm14,%xmm2
@@ -998,7 +1016,7 @@
 .byte	102,15,56,220,241
 .byte	102,15,56,220,249
 	jmp	.Lctr32_enc_loop6_enter
-.align	16
+.balign	16
 .Lctr32_enc_loop6:
 .byte	102,15,56,220,209
 .byte	102,15,56,220,217
@@ -1110,7 +1128,7 @@
 	movups	%xmm1,64(%rsi)
 	jmp	.Lctr32_done
 
-.align	16
+.balign	16
 .Lctr32_one_shortcut:
 	movups	(%r8),%xmm2
 	movups	(%rdi),%xmm8
@@ -1131,7 +1149,7 @@
 	movups	%xmm8,(%rsi)
 	jmp	.Lctr32_done
 
-.align	16
+.balign	16
 .Lctr32_two:
 	xorps	%xmm4,%xmm4
 	call	_aesni_encrypt3
@@ -1141,7 +1159,7 @@
 	movups	%xmm9,16(%rsi)
 	jmp	.Lctr32_done
 
-.align	16
+.balign	16
 .Lctr32_three:
 	call	_aesni_encrypt3
 	xorps	%xmm2,%xmm8
@@ -1152,7 +1170,7 @@
 	movups	%xmm10,32(%rsi)
 	jmp	.Lctr32_done
 
-.align	16
+.balign	16
 .Lctr32_four:
 	call	_aesni_encrypt4
 	xorps	%xmm2,%xmm8
@@ -1166,11 +1184,11 @@
 
 .Lctr32_done:
 	.byte	0xf3,0xc3
-.size	aesni_ctr32_encrypt_blocks,.-aesni_ctr32_encrypt_blocks
-.globl	aesni_xts_encrypt
-.type	aesni_xts_encrypt,@function
-.align	16
-aesni_xts_encrypt:
+SIZE(aesni_ctr32_encrypt_blocks)
+.globl	SYM(aesni_xts_encrypt)
+TYPEF(aesni_xts_encrypt)
+.balign	16
+SYM(aesni_xts_encrypt):
 	leaq	-104(%rsp),%rsp
 	movups	(%r9),%xmm15
 	movl	240(%r8),%eax
@@ -1230,7 +1248,7 @@
 	movl	%eax,%r10d
 	jmp	.Lxts_enc_grandloop
 
-.align	16
+.balign	16
 .Lxts_enc_grandloop:
 	pshufd	$19,%xmm14,%xmm9
 	movdqa	%xmm15,%xmm14
@@ -1281,7 +1299,7 @@
 	pcmpgtd	%xmm15,%xmm14
 	jmp	.Lxts_enc_loop6_enter
 
-.align	16
+.balign	16
 .Lxts_enc_loop6:
 .byte	102,15,56,220,209
 .byte	102,15,56,220,217
@@ -1434,7 +1452,7 @@
 	leaq	80(%rsi),%rsi
 	jmp	.Lxts_enc_done
 
-.align	16
+.balign	16
 .Lxts_enc_one:
 	movups	(%rdi),%xmm2
 	leaq	16(%rdi),%rdi
@@ -1456,7 +1474,7 @@
 	leaq	16(%rsi),%rsi
 	jmp	.Lxts_enc_done
 
-.align	16
+.balign	16
 .Lxts_enc_two:
 	movups	(%rdi),%xmm2
 	movups	16(%rdi),%xmm3
@@ -1474,7 +1492,7 @@
 	leaq	32(%rsi),%rsi
 	jmp	.Lxts_enc_done
 
-.align	16
+.balign	16
 .Lxts_enc_three:
 	movups	(%rdi),%xmm2
 	movups	16(%rdi),%xmm3
@@ -1496,7 +1514,7 @@
 	leaq	48(%rsi),%rsi
 	jmp	.Lxts_enc_done
 
-.align	16
+.balign	16
 .Lxts_enc_four:
 	movups	(%rdi),%xmm2
 	movups	16(%rdi),%xmm3
@@ -1522,7 +1540,7 @@
 	leaq	64(%rsi),%rsi
 	jmp	.Lxts_enc_done
 
-.align	16
+.balign	16
 .Lxts_enc_done:
 	andq	$15,%r9
 	jz	.Lxts_enc_ret
@@ -1562,11 +1580,11 @@
 	leaq	104(%rsp),%rsp
 .Lxts_enc_epilogue:
 	.byte	0xf3,0xc3
-.size	aesni_xts_encrypt,.-aesni_xts_encrypt
-.globl	aesni_xts_decrypt
-.type	aesni_xts_decrypt,@function
-.align	16
-aesni_xts_decrypt:
+SIZE(aesni_xts_encrypt)
+.globl	SYM(aesni_xts_decrypt)
+TYPEF(aesni_xts_decrypt)
+.balign	16
+SYM(aesni_xts_decrypt):
 	leaq	-104(%rsp),%rsp
 	movups	(%r9),%xmm15
 	movl	240(%r8),%eax
@@ -1632,7 +1650,7 @@
 	movl	%eax,%r10d
 	jmp	.Lxts_dec_grandloop
 
-.align	16
+.balign	16
 .Lxts_dec_grandloop:
 	pshufd	$19,%xmm14,%xmm9
 	movdqa	%xmm15,%xmm14
@@ -1683,7 +1701,7 @@
 	pcmpgtd	%xmm15,%xmm14
 	jmp	.Lxts_dec_loop6_enter
 
-.align	16
+.balign	16
 .Lxts_dec_loop6:
 .byte	102,15,56,222,209
 .byte	102,15,56,222,217
@@ -1845,7 +1863,7 @@
 	pxor	%xmm15,%xmm11
 	jmp	.Lxts_dec_done2
 
-.align	16
+.balign	16
 .Lxts_dec_one:
 	movups	(%rdi),%xmm2
 	leaq	16(%rdi),%rdi
@@ -1868,7 +1886,7 @@
 	leaq	16(%rsi),%rsi
 	jmp	.Lxts_dec_done
 
-.align	16
+.balign	16
 .Lxts_dec_two:
 	movups	(%rdi),%xmm2
 	movups	16(%rdi),%xmm3
@@ -1887,7 +1905,7 @@
 	leaq	32(%rsi),%rsi
 	jmp	.Lxts_dec_done
 
-.align	16
+.balign	16
 .Lxts_dec_three:
 	movups	(%rdi),%xmm2
 	movups	16(%rdi),%xmm3
@@ -1910,7 +1928,7 @@
 	leaq	48(%rsi),%rsi
 	jmp	.Lxts_dec_done
 
-.align	16
+.balign	16
 .Lxts_dec_four:
 	pshufd	$19,%xmm14,%xmm9
 	movdqa	%xmm15,%xmm14
@@ -1943,7 +1961,7 @@
 	leaq	64(%rsi),%rsi
 	jmp	.Lxts_dec_done
 
-.align	16
+.balign	16
 .Lxts_dec_done:
 	andq	$15,%r9
 	jz	.Lxts_dec_ret
@@ -2002,11 +2020,11 @@
 	leaq	104(%rsp),%rsp
 .Lxts_dec_epilogue:
 	.byte	0xf3,0xc3
-.size	aesni_xts_decrypt,.-aesni_xts_decrypt
-.globl	aesni_cbc_encrypt
-.type	aesni_cbc_encrypt,@function
-.align	16
-aesni_cbc_encrypt:
+SIZE(aesni_xts_decrypt)
+.globl	SYM(aesni_cbc_encrypt)
+TYPEF(aesni_cbc_encrypt)
+.balign	16
+SYM(aesni_cbc_encrypt):
 	testq	%rdx,%rdx
 	jz	.Lcbc_ret
 
@@ -2021,7 +2039,7 @@
 	jb	.Lcbc_enc_tail
 	subq	$16,%rdx
 	jmp	.Lcbc_enc_loop
-.align	16
+.balign	16
 .Lcbc_enc_loop:
 	movups	(%rdi),%xmm3
 	leaq	16(%rdi),%rdi
@@ -2064,7 +2082,7 @@
 	xorq	%rdx,%rdx
 	jmp	.Lcbc_enc_loop	
 
-.align	16
+.balign	16
 .Lcbc_decrypt:
 	movups	(%r8),%xmm9
 	movl	%r10d,%eax
@@ -2075,7 +2093,7 @@
 	movl	%r10d,%eax
 	movaps	%xmm9,-24(%rsp)
 	jmp	.Lcbc_dec_loop8_enter
-.align	16
+.balign	16
 .Lcbc_dec_loop8:
 	movaps	%xmm0,-24(%rsp)
 	movups	%xmm9,(%rsi)
@@ -2207,7 +2225,7 @@
 	movaps	%xmm8,%xmm2
 	subq	$112,%rdx
 	jmp	.Lcbc_dec_tail_collected
-.align	16
+.balign	16
 .Lcbc_dec_one:
 	movups	(%rcx),%xmm0
 	movups	16(%rcx),%xmm1
@@ -2224,7 +2242,7 @@
 	movaps	%xmm8,%xmm9
 	subq	$16,%rdx
 	jmp	.Lcbc_dec_tail_collected
-.align	16
+.balign	16
 .Lcbc_dec_two:
 	xorps	%xmm4,%xmm4
 	call	_aesni_decrypt3
@@ -2236,7 +2254,7 @@
 	leaq	16(%rsi),%rsi
 	subq	$32,%rdx
 	jmp	.Lcbc_dec_tail_collected
-.align	16
+.balign	16
 .Lcbc_dec_three:
 	call	_aesni_decrypt3
 	xorps	%xmm9,%xmm2
@@ -2249,7 +2267,7 @@
 	leaq	32(%rsi),%rsi
 	subq	$48,%rdx
 	jmp	.Lcbc_dec_tail_collected
-.align	16
+.balign	16
 .Lcbc_dec_four:
 	call	_aesni_decrypt4
 	xorps	%xmm9,%xmm2
@@ -2264,7 +2282,7 @@
 	leaq	48(%rsi),%rsi
 	subq	$64,%rdx
 	jmp	.Lcbc_dec_tail_collected
-.align	16
+.balign	16
 .Lcbc_dec_five:
 	xorps	%xmm7,%xmm7
 	call	_aesni_decrypt6
@@ -2285,7 +2303,7 @@
 	movaps	%xmm6,%xmm2
 	subq	$80,%rdx
 	jmp	.Lcbc_dec_tail_collected
-.align	16
+.balign	16
 .Lcbc_dec_six:
 	call	_aesni_decrypt6
 	movups	16(%rdi),%xmm1
@@ -2308,14 +2326,14 @@
 	movaps	%xmm7,%xmm2
 	subq	$96,%rdx
 	jmp	.Lcbc_dec_tail_collected
-.align	16
+.balign	16
 .Lcbc_dec_tail_collected:
 	andq	$15,%rdx
 	movups	%xmm9,(%r8)
 	jnz	.Lcbc_dec_tail_partial
 	movups	%xmm2,(%rsi)
 	jmp	.Lcbc_dec_ret
-.align	16
+.balign	16
 .Lcbc_dec_tail_partial:
 	movaps	%xmm2,-24(%rsp)
 	movq	$16,%rcx
@@ -2327,11 +2345,11 @@
 .Lcbc_dec_ret:
 .Lcbc_ret:
 	.byte	0xf3,0xc3
-.size	aesni_cbc_encrypt,.-aesni_cbc_encrypt
-.globl	aesni_set_decrypt_key
-.type	aesni_set_decrypt_key,@function
-.align	16
-aesni_set_decrypt_key:
+SIZE(aesni_cbc_encrypt)
+.globl	SYM(aesni_set_decrypt_key)
+TYPEF(aesni_set_decrypt_key)
+.balign	16
+SYM(aesni_set_decrypt_key):
 .byte	0x48,0x83,0xEC,0x08	
 	call	__aesni_set_encrypt_key
 	shll	$4,%esi
@@ -2365,11 +2383,11 @@
 	addq	$8,%rsp
 	.byte	0xf3,0xc3
 .LSEH_end_set_decrypt_key:
-.size	aesni_set_decrypt_key,.-aesni_set_decrypt_key
-.globl	aesni_set_encrypt_key
-.type	aesni_set_encrypt_key,@function
-.align	16
-aesni_set_encrypt_key:
+SIZE(aesni_set_decrypt_key)
+.globl	SYM(aesni_set_encrypt_key)
+TYPEF(aesni_set_encrypt_key)
+.balign	16
+SYM(aesni_set_encrypt_key):
 __aesni_set_encrypt_key:
 .byte	0x48,0x83,0xEC,0x08	
 	movq	$-1,%rax
@@ -2416,7 +2434,7 @@
 	xorl	%eax,%eax
 	jmp	.Lenc_key_ret
 
-.align	16
+.balign	16
 .L12rounds:
 	movq	16(%rdi),%xmm2
 	movl	$11,%esi
@@ -2442,7 +2460,7 @@
 	xorq	%rax,%rax
 	jmp	.Lenc_key_ret
 
-.align	16
+.balign	16
 .L14rounds:
 	movups	16(%rdi),%xmm2
 	movl	$13,%esi
@@ -2480,7 +2498,7 @@
 	xorq	%rax,%rax
 	jmp	.Lenc_key_ret
 
-.align	16
+.balign	16
 .Lbad_keybits:
 	movq	$-2,%rax
 .Lenc_key_ret:
@@ -2488,7 +2506,7 @@
 	.byte	0xf3,0xc3
 .LSEH_end_set_encrypt_key:
 
-.align	16
+.balign	16
 .Lkey_expansion_128:
 	movups	%xmm0,(%rax)
 	leaq	16(%rax),%rax
@@ -2501,7 +2519,7 @@
 	xorps	%xmm1,%xmm0
 	.byte	0xf3,0xc3
 
-.align	16
+.balign	16
 .Lkey_expansion_192a:
 	movups	%xmm0,(%rax)
 	leaq	16(%rax),%rax
@@ -2521,7 +2539,7 @@
 	pxor	%xmm3,%xmm2
 	.byte	0xf3,0xc3
 
-.align	16
+.balign	16
 .Lkey_expansion_192b:
 	movaps	%xmm0,%xmm3
 	shufps	$68,%xmm0,%xmm5
@@ -2531,7 +2549,7 @@
 	leaq	32(%rax),%rax
 	jmp	.Lkey_expansion_192b_warm
 
-.align	16
+.balign	16
 .Lkey_expansion_256a:
 	movups	%xmm2,(%rax)
 	leaq	16(%rax),%rax
@@ -2544,7 +2562,7 @@
 	xorps	%xmm1,%xmm0
 	.byte	0xf3,0xc3
 
-.align	16
+.balign	16
 .Lkey_expansion_256b:
 	movups	%xmm0,(%rax)
 	leaq	16(%rax),%rax
@@ -2556,9 +2574,9 @@
 	shufps	$170,%xmm1,%xmm1
 	xorps	%xmm1,%xmm2
 	.byte	0xf3,0xc3
-.size	aesni_set_encrypt_key,.-aesni_set_encrypt_key
-.size	__aesni_set_encrypt_key,.-__aesni_set_encrypt_key
-.align	64
+SIZE(aesni_set_encrypt_key)
+SIZE(__aesni_set_encrypt_key)
+.balign	64
 .Lbswap_mask:
 .byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
 .Lincrement32:
@@ -2569,6 +2587,8 @@
 .long	0x87,0,1,0
 
 .byte	65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69,83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
-.align	64
+.balign	64
 
+#ifdef __linux__
 .section .note.GNU-stack,"",%progbits
+#endif
--- gnutls-3.0.15/lib/accelerated/x86/asm/appro-aes-gcm-x86-64.s.orig	2012-03-14 21:32:02.000000000 -0400
+++ gnutls-3.0.15/lib/accelerated/x86/asm/appro-aes-gcm-x86-64.s	2012-03-14 21:51:18.000000000 -0400
@@ -35,12 +35,31 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef __MACH__
+#  define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
+#  define SYM(x) x
+#endif
+
+#ifdef __ELF__
+#  define TYPEF(x) .type SYM(x), @function
+#  define TYPEO(x) .type SYM(x), @object
+#  define SIZE(x) .size SYM(x), . - SYM(x)
+#else
+#  define TYPEF(x)
+#  define TYPEO(x)
+#  define SIZE(x)
+#endif
+
 .text	
 
-.globl	gcm_gmult_4bit
-.type	gcm_gmult_4bit,@function
-.align	16
-gcm_gmult_4bit:
+.globl	SYM(gcm_gmult_4bit)
+TYPEF(gcm_gmult_4bit)
+.balign	16
+SYM(gcm_gmult_4bit):
 	pushq	%rbx
 	pushq	%rbp
 	pushq	%r12
@@ -60,7 +79,7 @@
 	movq	%r8,%rdx
 	jmp	.Loop1
 
-.align	16
+.balign	16
 .Loop1:
 	shrq	$4,%r8
 	andq	$15,%rdx
@@ -91,7 +110,7 @@
 	xorq	%r10,%r8
 	jmp	.Loop1
 
-.align	16
+.balign	16
 .Lbreak1:
 	shrq	$4,%r8
 	andq	$15,%rdx
@@ -124,11 +143,11 @@
 	leaq	24(%rsp),%rsp
 .Lgmult_epilogue:
 	.byte	0xf3,0xc3
-.size	gcm_gmult_4bit,.-gcm_gmult_4bit
-.globl	gcm_ghash_4bit
-.type	gcm_ghash_4bit,@function
-.align	16
-gcm_ghash_4bit:
+SIZE(gcm_gmult_4bit)
+.globl	SYM(gcm_ghash_4bit)
+TYPEF(gcm_ghash_4bit)
+.balign	16
+SYM(gcm_ghash_4bit):
 	pushq	%rbx
 	pushq	%rbp
 	pushq	%r12
@@ -340,7 +359,7 @@
 	addq	%r14,%r15
 	leaq	.Lrem_8bit(%rip),%r11
 	jmp	.Louter_loop
-.align	16
+.balign	16
 .Louter_loop:
 	xorq	(%r14),%r9
 	movq	8(%r14),%rdx
@@ -690,11 +709,11 @@
 	leaq	48(%rsi),%rsp
 .Lghash_epilogue:
 	.byte	0xf3,0xc3
-.size	gcm_ghash_4bit,.-gcm_ghash_4bit
-.globl	gcm_init_clmul
-.type	gcm_init_clmul,@function
-.align	16
-gcm_init_clmul:
+SIZE(gcm_ghash_4bit)
+.globl	SYM(gcm_init_clmul)
+TYPEF(gcm_init_clmul)
+.balign	16
+SYM(gcm_init_clmul):
 	movdqu	(%rsi),%xmm2
 	pshufd	$78,%xmm2,%xmm2
 
@@ -755,11 +774,11 @@
 	movdqu	%xmm2,(%rdi)
 	movdqu	%xmm0,16(%rdi)
 	.byte	0xf3,0xc3
-.size	gcm_init_clmul,.-gcm_init_clmul
-.globl	gcm_gmult_clmul
-.type	gcm_gmult_clmul,@function
-.align	16
-gcm_gmult_clmul:
+SIZE(gcm_init_clmul)
+.globl	SYM(gcm_gmult_clmul)
+TYPEF(gcm_gmult_clmul)
+.balign	16
+SYM(gcm_gmult_clmul):
 	movdqu	(%rdi),%xmm0
 	movdqa	.Lbswap_mask(%rip),%xmm5
 	movdqu	(%rsi),%xmm2
@@ -805,11 +824,11 @@
 .byte	102,15,56,0,197
 	movdqu	%xmm0,(%rdi)
 	.byte	0xf3,0xc3
-.size	gcm_gmult_clmul,.-gcm_gmult_clmul
-.globl	gcm_ghash_clmul
-.type	gcm_ghash_clmul,@function
-.align	16
-gcm_ghash_clmul:
+SIZE(gcm_gmult_clmul)
+.globl	SYM(gcm_ghash_clmul)
+TYPEF(gcm_ghash_clmul)
+.balign	16
+SYM(gcm_ghash_clmul):
 	movdqa	.Lbswap_mask(%rip),%xmm5
 
 	movdqu	(%rdi),%xmm0
@@ -1011,20 +1030,20 @@
 	movdqu	%xmm0,(%rdi)
 	.byte	0xf3,0xc3
 .LSEH_end_gcm_ghash_clmul:
-.size	gcm_ghash_clmul,.-gcm_ghash_clmul
-.align	64
+SIZE(gcm_ghash_clmul)
+.balign	64
 .Lbswap_mask:
 .byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
 .L0x1c2_polynomial:
 .byte	1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2
-.align	64
-.type	.Lrem_4bit,@object
+.balign	64
+TYPEO(.Lrem_4bit)
 .Lrem_4bit:
 .long	0,0,0,471859200,0,943718400,0,610271232
 .long	0,1887436800,0,1822425088,0,1220542464,0,1423966208
 .long	0,3774873600,0,4246732800,0,3644850176,0,3311403008
 .long	0,2441084928,0,2376073216,0,2847932416,0,3051356160
-.type	.Lrem_8bit,@object
+TYPEO(.Lrem_8bit)
 .Lrem_8bit:
 .value	0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E
 .value	0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E
@@ -1060,6 +1079,8 @@
 .value	0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE
 
 .byte	71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
-.align	64
+.balign	64
 
+#ifdef __linux__
 .section .note.GNU-stack,"",%progbits
+#endif
--- gnutls-3.0.15/lib/accelerated/x86/asm/padlock-x86-64.s.orig	2012-03-14 21:32:21.000000000 -0400
+++ gnutls-3.0.15/lib/accelerated/x86/asm/padlock-x86-64.s	2012-03-14 21:56:42.000000000 -0400
@@ -35,11 +35,28 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef __MACH__
+#  define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
+#  define SYM(x) x
+#endif
+
+#ifdef __ELF__
+#  define TYPEF(x) .type SYM(x), @function
+#  define SIZE(x) .size SYM(x), . - SYM(x)
+#else
+#  define TYPEF(x)
+#  define SIZE(x)
+#endif
+
 .text	
-.globl	padlock_capability
-.type	padlock_capability,@function
-.align	16
-padlock_capability:
+.globl	SYM(padlock_capability)
+TYPEF(padlock_capability)
+.balign	16
+SYM(padlock_capability):
 	movq	%rbx,%r8
 	xorl	%eax,%eax
 	cpuid
@@ -64,12 +81,12 @@
 .Lnoluck:
 	movq	%r8,%rbx
 	.byte	0xf3,0xc3
-.size	padlock_capability,.-padlock_capability
+SIZE(padlock_capability)
 
-.globl	padlock_key_bswap
-.type	padlock_key_bswap,@function
-.align	16
-padlock_key_bswap:
+.globl	SYM(padlock_key_bswap)
+TYPEF(padlock_key_bswap)
+.balign	16
+SYM(padlock_key_bswap):
 	movl	240(%rdi),%edx
 .Lbswap_loop:
 	movl	(%rdi),%eax
@@ -79,22 +96,22 @@
 	subl	$1,%edx
 	jnz	.Lbswap_loop
 	.byte	0xf3,0xc3
-.size	padlock_key_bswap,.-padlock_key_bswap
+SIZE(padlock_key_bswap)
 
-.globl	padlock_verify_context
-.type	padlock_verify_context,@function
-.align	16
-padlock_verify_context:
+.globl	SYM(padlock_verify_context)
+TYPEF(padlock_verify_context)
+.balign	16
+SYM(padlock_verify_context):
 	movq	%rdi,%rdx
 	pushf
 	leaq	.Lpadlock_saved_context(%rip),%rax
 	call	_padlock_verify_ctx
 	leaq	8(%rsp),%rsp
 	.byte	0xf3,0xc3
-.size	padlock_verify_context,.-padlock_verify_context
+SIZE(padlock_verify_context)
 
-.type	_padlock_verify_ctx,@function
-.align	16
+TYPEF(_padlock_verify_ctx)
+.balign	16
 _padlock_verify_ctx:
 	movq	8(%rsp),%r8
 	btq	$30,%r8
@@ -106,21 +123,21 @@
 .Lverified:
 	movq	%rdx,(%rax)
 	.byte	0xf3,0xc3
-.size	_padlock_verify_ctx,.-_padlock_verify_ctx
+SIZE(_padlock_verify_ctx)
 
-.globl	padlock_reload_key
-.type	padlock_reload_key,@function
-.align	16
-padlock_reload_key:
+.globl	SYM(padlock_reload_key)
+TYPEF(padlock_reload_key)
+.balign	16
+SYM(padlock_reload_key):
 	pushf
 	popf
 	.byte	0xf3,0xc3
-.size	padlock_reload_key,.-padlock_reload_key
+SIZE(padlock_reload_key)
 
-.globl	padlock_aes_block
-.type	padlock_aes_block,@function
-.align	16
-padlock_aes_block:
+.globl	SYM(padlock_aes_block)
+TYPEF(padlock_aes_block)
+.balign	16
+SYM(padlock_aes_block):
 	movq	%rbx,%r8
 	movq	$1,%rcx
 	leaq	32(%rdx),%rbx
@@ -128,21 +145,21 @@
 .byte	0xf3,0x0f,0xa7,0xc8	
 	movq	%r8,%rbx
 	.byte	0xf3,0xc3
-.size	padlock_aes_block,.-padlock_aes_block
+SIZE(padlock_aes_block)
 
-.globl	padlock_xstore
-.type	padlock_xstore,@function
-.align	16
-padlock_xstore:
+.globl	SYM(padlock_xstore)
+TYPEF(padlock_xstore)
+.balign	16
+SYM(padlock_xstore):
 	movl	%esi,%edx
 .byte	0x0f,0xa7,0xc0		
 	.byte	0xf3,0xc3
-.size	padlock_xstore,.-padlock_xstore
+SIZE(padlock_xstore)
 
-.globl	padlock_sha1_oneshot
-.type	padlock_sha1_oneshot,@function
+.globl	SYM(padlock_sha1_oneshot)
+TYPEF(padlock_sha1_oneshot)
 .align	16
-padlock_sha1_oneshot:
+SYM(padlock_sha1_oneshot):
 	movq	%rdx,%rcx
 	movq	%rdi,%rdx
 	movups	(%rdi),%xmm0
@@ -159,12 +176,12 @@
 	movups	%xmm0,(%rdx)
 	movl	%eax,16(%rdx)
 	.byte	0xf3,0xc3
-.size	padlock_sha1_oneshot,.-padlock_sha1_oneshot
+SIZE(padlock_sha1_oneshot)
 
-.globl	padlock_sha1_blocks
-.type	padlock_sha1_blocks,@function
-.align	16
-padlock_sha1_blocks:
+.globl	SYM(padlock_sha1_blocks)
+TYPEF(padlock_sha1_blocks)
+.balign	16
+SYM(padlock_sha1_blocks):
 	movq	%rdx,%rcx
 	movq	%rdi,%rdx
 	movups	(%rdi),%xmm0
@@ -181,12 +198,12 @@
 	movups	%xmm0,(%rdx)
 	movl	%eax,16(%rdx)
 	.byte	0xf3,0xc3
-.size	padlock_sha1_blocks,.-padlock_sha1_blocks
+SIZE(padlock_sha1_blocks)
 
-.globl	padlock_sha256_oneshot
-.type	padlock_sha256_oneshot,@function
-.align	16
-padlock_sha256_oneshot:
+.globl	SYM(padlock_sha256_oneshot)
+TYPEF(padlock_sha256_oneshot)
+.balign	16
+SYM(padlock_sha256_oneshot):
 	movq	%rdx,%rcx
 	movq	%rdi,%rdx
 	movups	(%rdi),%xmm0
@@ -203,12 +220,12 @@
 	movups	%xmm0,(%rdx)
 	movups	%xmm1,16(%rdx)
 	.byte	0xf3,0xc3
-.size	padlock_sha256_oneshot,.-padlock_sha256_oneshot
+SIZE(padlock_sha256_oneshot)
 
-.globl	padlock_sha256_blocks
-.type	padlock_sha256_blocks,@function
-.align	16
-padlock_sha256_blocks:
+.globl	SYM(padlock_sha256_blocks)
+TYPEF(padlock_sha256_blocks)
+.balign	16
+SYM(padlock_sha256_blocks):
 	movq	%rdx,%rcx
 	movq	%rdi,%rdx
 	movups	(%rdi),%xmm0
@@ -225,12 +242,12 @@
 	movups	%xmm0,(%rdx)
 	movups	%xmm1,16(%rdx)
 	.byte	0xf3,0xc3
-.size	padlock_sha256_blocks,.-padlock_sha256_blocks
+SIZE(padlock_sha256_blocks)
 
-.globl	padlock_sha512_blocks
-.type	padlock_sha512_blocks,@function
-.align	16
-padlock_sha512_blocks:
+.globl	SYM(padlock_sha512_blocks)
+TYPEF(padlock_sha512_blocks)
+.balign	16
+SYM(padlock_sha512_blocks):
 	movq	%rdx,%rcx
 	movq	%rdi,%rdx
 	movups	(%rdi),%xmm0
@@ -254,11 +271,11 @@
 	movups	%xmm2,32(%rdx)
 	movups	%xmm3,48(%rdx)
 	.byte	0xf3,0xc3
-.size	padlock_sha512_blocks,.-padlock_sha512_blocks
-.globl	padlock_ecb_encrypt
-.type	padlock_ecb_encrypt,@function
-.align	16
-padlock_ecb_encrypt:
+SIZE(padlock_sha512_blocks)
+.globl	SYM(padlock_ecb_encrypt)
+TYPEF(padlock_ecb_encrypt)
+.balign	16
+SYM(padlock_ecb_encrypt):
 	pushq	%rbp
 	pushq	%rbx
 
@@ -296,7 +313,7 @@
 	andq	$512-1,%rbx
 	leaq	(%rax,%rbp,1),%rsp
 	jmp	.Lecb_loop
-.align	16
+.balign	16
 .Lecb_loop:
 	cmpq	%rcx,%rbx
 	cmovaq	%rcx,%rbx
@@ -351,7 +368,7 @@
 .Lecb_done:
 	leaq	(%rbp),%rsp
 	jmp	.Lecb_exit
-.align	16
+.balign	16
 .Lecb_short:
 	movq	%rsp,%rbp
 	subq	%rcx,%rsp
@@ -365,7 +382,7 @@
 	movq	%rsp,%rsi
 	movq	%rcx,%rbx
 	jmp	.Lecb_loop
-.align	16
+.balign	16
 .Lecb_aligned:
 	leaq	-16(%rdx),%rax
 	leaq	16(%rdx),%rbx
@@ -378,11 +395,11 @@
 	popq	%rbx
 	popq	%rbp
 	.byte	0xf3,0xc3
-.size	padlock_ecb_encrypt,.-padlock_ecb_encrypt
-.globl	padlock_cbc_encrypt
-.type	padlock_cbc_encrypt,@function
-.align	16
-padlock_cbc_encrypt:
+SIZE(padlock_ecb_encrypt)
+.globl	SYM(padlock_cbc_encrypt)
+TYPEF(padlock_cbc_encrypt)
+.balign	16
+SYM(padlock_cbc_encrypt):
 	pushq	%rbp
 	pushq	%rbx
 
@@ -420,7 +437,7 @@
 	andq	$512-1,%rbx
 	leaq	(%rax,%rbp,1),%rsp
 	jmp	.Lcbc_loop
-.align	16
+.balign	16
 .Lcbc_loop:
 	cmpq	%rcx,%rbx
 	cmovaq	%rcx,%rbx
@@ -477,7 +494,7 @@
 .Lcbc_done:
 	leaq	(%rbp),%rsp
 	jmp	.Lcbc_exit
-.align	16
+.balign	16
 .Lcbc_short:
 	movq	%rsp,%rbp
 	subq	%rcx,%rsp
@@ -491,7 +508,7 @@
 	movq	%rsp,%rsi
 	movq	%rcx,%rbx
 	jmp	.Lcbc_loop
-.align	16
+.balign	16
 .Lcbc_aligned:
 	leaq	-16(%rdx),%rax
 	leaq	16(%rdx),%rbx
@@ -506,12 +523,14 @@
 	popq	%rbx
 	popq	%rbp
 	.byte	0xf3,0xc3
-.size	padlock_cbc_encrypt,.-padlock_cbc_encrypt
+SIZE(padlock_cbc_encrypt)
 .byte	86,73,65,32,80,97,100,108,111,99,107,32,120,56,54,95,54,52,32,109,111,100,117,108,101,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
-.align	16
+.balign	16
 .data	
-.align	8
+.balign	8
 .Lpadlock_saved_context:
 .quad	0
 
+#ifdef __linux__
 .section .note.GNU-stack,"",%progbits
+#endif
--- gnutls-3.0.15/lib/accelerated/x86/asm/cpuid-x86-64.s.orig	2012-03-14 21:32:37.000000000 -0400
+++ gnutls-3.0.15/lib/accelerated/x86/asm/cpuid-x86-64.s	2012-03-14 21:58:13.000000000 -0400
@@ -18,11 +18,29 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
+
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef __MACH__
+#  define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
+#  define SYM(x) x
+#endif
+
+#ifdef __ELF__
+#  define TYPEF(x) .type SYM(x), @function
+#  define SIZE(x) .size SYM(x), . - SYM(x)
+#else
+#  define TYPEF(x)
+#  define SIZE(x)
+#endif
+
 .text	
-.globl	gnutls_cpuid
-.type	gnutls_cpuid,@function
-.align	16
-gnutls_cpuid:
+.globl	SYM(gnutls_cpuid)
+TYPEF(gnutls_cpuid)
+.balign	16
+SYM(gnutls_cpuid):
 	pushq	%rbp
 	movq	%rsp,%rbp
 	pushq	%rbx
@@ -51,6 +69,8 @@
 	popq	%rbx
 	leave
 	.byte	0xf3,0xc3
-.size	gnutls_cpuid,.-gnutls_cpuid
+SIZE(gnutls_cpuid)
 
+#ifdef __linux__
 .section .note.GNU-stack,"",%progbits
+#endif
--- gnutls-3.0.15/lib/accelerated/x86/asm/appro-aes-x86.s.orig	2012-03-14 21:32:56.000000000 -0400
+++ gnutls-3.0.15/lib/accelerated/x86/asm/appro-aes-x86.s	2012-03-14 22:13:54.000000000 -0400
@@ -35,12 +35,29 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef __MACH__
+#  define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
+#  define SYM(x) x
+#endif
+
+#ifdef __ELF__
+#  define TYPEF(x) .type SYM(x), @function
+#  define SIZE(x) .size SYM(x), . - SYM(x)
+#else
+#  define TYPEF(x)
+#  define SIZE(x)
+#endif
+
 .file	"devel/perlasm/aesni-x86.s"
 .text
-.globl	aesni_encrypt
-.type	aesni_encrypt,@function
-.align	16
-aesni_encrypt:
+.globl	SYM(aesni_encrypt)
+TYPEF(aesni_encrypt)
+.balign	16
+SYM(aesni_encrypt):
 .L_aesni_encrypt_begin:
 	movl	4(%esp),%eax
 	movl	12(%esp),%edx
@@ -60,11 +77,11 @@
 .byte	102,15,56,221,209
 	movups	%xmm2,(%eax)
 	ret
-.size	aesni_encrypt,.-.L_aesni_encrypt_begin
-.globl	aesni_decrypt
-.type	aesni_decrypt,@function
-.align	16
-aesni_decrypt:
+SIZE(aesni_encrypt)
+.globl	SYM(aesni_decrypt)
+TYPEF(aesni_decrypt)
+.balign	16
+SYM(aesni_decrypt):
 .L_aesni_decrypt_begin:
 	movl	4(%esp),%eax
 	movl	12(%esp),%edx
@@ -84,9 +101,9 @@
 .byte	102,15,56,223,209
 	movups	%xmm2,(%eax)
 	ret
-.size	aesni_decrypt,.-.L_aesni_decrypt_begin
-.type	_aesni_encrypt3,@function
-.align	16
+SIZE(aesni_decrypt)
+TYPEF(_aesni_encrypt3)
+.balign	16
 _aesni_encrypt3:
 	movups	(%edx),%xmm0
 	shrl	$1,%ecx
@@ -115,9 +132,9 @@
 .byte	102,15,56,221,216
 .byte	102,15,56,221,224
 	ret
-.size	_aesni_encrypt3,.-_aesni_encrypt3
-.type	_aesni_decrypt3,@function
-.align	16
+SIZE(_aesni_encrypt3)
+TYPEF(_aesni_decrypt3)
+.balign	16
 _aesni_decrypt3:
 	movups	(%edx),%xmm0
 	shrl	$1,%ecx
@@ -146,9 +163,9 @@
 .byte	102,15,56,223,216
 .byte	102,15,56,223,224
 	ret
-.size	_aesni_decrypt3,.-_aesni_decrypt3
-.type	_aesni_encrypt4,@function
-.align	16
+SIZE(_aesni_decrypt3)
+TYPEF(_aesni_encrypt4)
+.balign	16
 _aesni_encrypt4:
 	movups	(%edx),%xmm0
 	movups	16(%edx),%xmm1
@@ -182,9 +199,9 @@
 .byte	102,15,56,221,224
 .byte	102,15,56,221,232
 	ret
-.size	_aesni_encrypt4,.-_aesni_encrypt4
-.type	_aesni_decrypt4,@function
-.align	16
+SIZE(_aesni_encrypt4)
+TYPEF(_aesni_decrypt4)
+.balign	16
 _aesni_decrypt4:
 	movups	(%edx),%xmm0
 	movups	16(%edx),%xmm1
@@ -218,9 +235,9 @@
 .byte	102,15,56,223,224
 .byte	102,15,56,223,232
 	ret
-.size	_aesni_decrypt4,.-_aesni_decrypt4
-.type	_aesni_encrypt6,@function
-.align	16
+SIZE(_aesni_decrypt4)
+TYPEF(_aesni_encrypt6)
+.balign	16
 _aesni_encrypt6:
 	movups	(%edx),%xmm0
 	shrl	$1,%ecx
@@ -241,7 +258,7 @@
 	movups	(%edx),%xmm0
 .byte	102,15,56,220,249
 	jmp	.L_aesni_encrypt6_enter
-.align	16
+.balign	16
 .L006enc6_loop:
 .byte	102,15,56,220,209
 .byte	102,15,56,220,217
@@ -250,7 +267,7 @@
 .byte	102,15,56,220,233
 .byte	102,15,56,220,241
 .byte	102,15,56,220,249
-.align	16
+.balign	16
 .L_aesni_encrypt6_enter:
 	movups	16(%edx),%xmm1
 .byte	102,15,56,220,208
@@ -275,9 +292,9 @@
 .byte	102,15,56,221,240
 .byte	102,15,56,221,248
 	ret
-.size	_aesni_encrypt6,.-_aesni_encrypt6
-.type	_aesni_decrypt6,@function
-.align	16
+SIZE(_aesni_encrypt6)
+TYPEF(_aesni_decrypt6)
+.balign	16
 _aesni_decrypt6:
 	movups	(%edx),%xmm0
 	shrl	$1,%ecx
@@ -298,7 +315,7 @@
 	movups	(%edx),%xmm0
 .byte	102,15,56,222,249
 	jmp	.L_aesni_decrypt6_enter
-.align	16
+.balign	16
 .L007dec6_loop:
 .byte	102,15,56,222,209
 .byte	102,15,56,222,217
@@ -307,7 +324,7 @@
 .byte	102,15,56,222,233
 .byte	102,15,56,222,241
 .byte	102,15,56,222,249
-.align	16
+.balign	16
 .L_aesni_decrypt6_enter:
 	movups	16(%edx),%xmm1
 .byte	102,15,56,222,208
@@ -332,11 +349,11 @@
 .byte	102,15,56,223,240
 .byte	102,15,56,223,248
 	ret
-.size	_aesni_decrypt6,.-_aesni_decrypt6
-.globl	aesni_ecb_encrypt
-.type	aesni_ecb_encrypt,@function
-.align	16
-aesni_ecb_encrypt:
+SIZE(_aesni_decrypt6)
+.globl	SYM(aesni_ecb_encrypt)
+TYPEF(aesni_ecb_encrypt)
+.balign	16
+SYM(aesni_ecb_encrypt):
 .L_aesni_ecb_encrypt_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -365,7 +382,7 @@
 	leal	96(%esi),%esi
 	subl	$96,%eax
 	jmp	.L011ecb_enc_loop6_enter
-.align	16
+.balign	16
 .L012ecb_enc_loop6:
 	movups	%xmm2,(%edi)
 	movdqu	(%esi),%xmm2
@@ -416,7 +433,7 @@
 	movups	%xmm5,48(%edi)
 	movups	%xmm6,64(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L013ecb_enc_one:
 	movups	(%edx),%xmm0
 	movups	16(%edx),%xmm1
@@ -431,21 +448,21 @@
 .byte	102,15,56,221,209
 	movups	%xmm2,(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L014ecb_enc_two:
 	xorps	%xmm4,%xmm4
 	call	_aesni_encrypt3
 	movups	%xmm2,(%edi)
 	movups	%xmm3,16(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L015ecb_enc_three:
 	call	_aesni_encrypt3
 	movups	%xmm2,(%edi)
 	movups	%xmm3,16(%edi)
 	movups	%xmm4,32(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L016ecb_enc_four:
 	call	_aesni_encrypt4
 	movups	%xmm2,(%edi)
@@ -453,7 +470,7 @@
 	movups	%xmm4,32(%edi)
 	movups	%xmm5,48(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L009ecb_decrypt:
 	movl	%edx,%ebp
 	movl	%ecx,%ebx
@@ -468,7 +485,7 @@
 	leal	96(%esi),%esi
 	subl	$96,%eax
 	jmp	.L019ecb_dec_loop6_enter
-.align	16
+.balign	16
 .L020ecb_dec_loop6:
 	movups	%xmm2,(%edi)
 	movdqu	(%esi),%xmm2
@@ -519,7 +536,7 @@
 	movups	%xmm5,48(%edi)
 	movups	%xmm6,64(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L021ecb_dec_one:
 	movups	(%edx),%xmm0
 	movups	16(%edx),%xmm1
@@ -534,21 +551,21 @@
 .byte	102,15,56,223,209
 	movups	%xmm2,(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L022ecb_dec_two:
 	xorps	%xmm4,%xmm4
 	call	_aesni_decrypt3
 	movups	%xmm2,(%edi)
 	movups	%xmm3,16(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L023ecb_dec_three:
 	call	_aesni_decrypt3
 	movups	%xmm2,(%edi)
 	movups	%xmm3,16(%edi)
 	movups	%xmm4,32(%edi)
 	jmp	.L008ecb_ret
-.align	16
+.balign	16
 .L024ecb_dec_four:
 	call	_aesni_decrypt4
 	movups	%xmm2,(%edi)
@@ -561,11 +578,11 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	aesni_ecb_encrypt,.-.L_aesni_ecb_encrypt_begin
-.globl	aesni_ccm64_encrypt_blocks
-.type	aesni_ccm64_encrypt_blocks,@function
-.align	16
-aesni_ccm64_encrypt_blocks:
+SIZE(aesni_ecb_encrypt)
+.globl	SYM(aesni_ccm64_encrypt_blocks)
+TYPEF(aesni_ccm64_encrypt_blocks)
+.balign	16
+SYM(aesni_ccm64_encrypt_blocks):
 .L_aesni_ccm64_encrypt_blocks_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -641,11 +658,11 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	aesni_ccm64_encrypt_blocks,.-.L_aesni_ccm64_encrypt_blocks_begin
-.globl	aesni_ccm64_decrypt_blocks
-.type	aesni_ccm64_decrypt_blocks,@function
-.align	16
-aesni_ccm64_decrypt_blocks:
+SIZE(aesni_ccm64_encrypt_blocks)
+.globl	SYM(aesni_ccm64_decrypt_blocks)
+TYPEF(aesni_ccm64_decrypt_blocks)
+.balign	16
+SYM(aesni_ccm64_decrypt_blocks):
 .L_aesni_ccm64_decrypt_blocks_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -694,7 +711,7 @@
 	paddq	16(%esp),%xmm7
 	leal	16(%esi),%esi
 	jmp	.L029ccm64_dec_outer
-.align	16
+.balign	16
 .L029ccm64_dec_outer:
 	xorps	%xmm2,%xmm6
 	movdqa	%xmm7,%xmm2
@@ -730,7 +747,7 @@
 .byte	102,15,56,221,208
 .byte	102,15,56,221,216
 	jmp	.L029ccm64_dec_outer
-.align	16
+.balign	16
 .L030ccm64_dec_break:
 	movl	%ebp,%edx
 	movups	(%edx),%xmm0
@@ -753,11 +770,11 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	aesni_ccm64_decrypt_blocks,.-.L_aesni_ccm64_decrypt_blocks_begin
-.globl	aesni_ctr32_encrypt_blocks
-.type	aesni_ctr32_encrypt_blocks,@function
-.align	16
-aesni_ctr32_encrypt_blocks:
+SIZE(aesni_ccm64_decrypt_blocks)
+.globl	SYM(aesni_ctr32_encrypt_blocks)
+TYPEF(aesni_ctr32_encrypt_blocks)
+.balign	16
+SYM(aesni_ctr32_encrypt_blocks):
 .L_aesni_ctr32_encrypt_blocks_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -817,7 +834,7 @@
 	movl	%ecx,%ebx
 	subl	$6,%eax
 	jmp	.L035ctr32_loop6
-.align	16
+.balign	16
 .L035ctr32_loop6:
 	pshufd	$64,%xmm1,%xmm4
 	movdqa	32(%esp),%xmm1
@@ -919,7 +936,7 @@
 	movups	%xmm5,48(%edi)
 	movups	%xmm6,64(%edi)
 	jmp	.L036ctr32_ret
-.align	16
+.balign	16
 .L033ctr32_one_shortcut:
 	movups	(%ebx),%xmm2
 	movl	240(%edx),%ecx
@@ -939,7 +956,7 @@
 	xorps	%xmm2,%xmm6
 	movups	%xmm6,(%edi)
 	jmp	.L036ctr32_ret
-.align	16
+.balign	16
 .L038ctr32_two:
 	call	_aesni_encrypt3
 	movups	(%esi),%xmm5
@@ -949,7 +966,7 @@
 	movups	%xmm2,(%edi)
 	movups	%xmm3,16(%edi)
 	jmp	.L036ctr32_ret
-.align	16
+.balign	16
 .L039ctr32_three:
 	call	_aesni_encrypt3
 	movups	(%esi),%xmm5
@@ -962,7 +979,7 @@
 	movups	%xmm3,16(%edi)
 	movups	%xmm4,32(%edi)
 	jmp	.L036ctr32_ret
-.align	16
+.balign	16
 .L040ctr32_four:
 	call	_aesni_encrypt4
 	movups	(%esi),%xmm6
@@ -984,11 +1001,11 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	aesni_ctr32_encrypt_blocks,.-.L_aesni_ctr32_encrypt_blocks_begin
-.globl	aesni_xts_encrypt
-.type	aesni_xts_encrypt,@function
-.align	16
-aesni_xts_encrypt:
+SIZE(aesni_ctr32_encrypt_blocks)
+.globl	SYM(aesni_xts_encrypt)
+TYPEF(aesni_xts_encrypt)
+.balign	16
+SYM(aesni_xts_encrypt):
 .L_aesni_xts_encrypt_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -1035,7 +1052,7 @@
 	shrl	$1,%ecx
 	movl	%ecx,%ebx
 	jmp	.L044xts_enc_loop6
-.align	16
+.balign	16
 .L044xts_enc_loop6:
 	pshufd	$19,%xmm0,%xmm2
 	pxor	%xmm0,%xmm0
@@ -1195,7 +1212,7 @@
 	movups	%xmm6,64(%edi)
 	leal	80(%edi),%edi
 	jmp	.L050xts_enc_done
-.align	16
+.balign	16
 .L046xts_enc_one:
 	movups	(%esi),%xmm2
 	leal	16(%esi),%esi
@@ -1216,7 +1233,7 @@
 	leal	16(%edi),%edi
 	movdqa	%xmm5,%xmm1
 	jmp	.L050xts_enc_done
-.align	16
+.balign	16
 .L047xts_enc_two:
 	movaps	%xmm1,%xmm6
 	movups	(%esi),%xmm2
@@ -1233,7 +1250,7 @@
 	leal	32(%edi),%edi
 	movdqa	%xmm6,%xmm1
 	jmp	.L050xts_enc_done
-.align	16
+.balign	16
 .L048xts_enc_three:
 	movaps	%xmm1,%xmm7
 	movups	(%esi),%xmm2
@@ -1253,7 +1270,7 @@
 	leal	48(%edi),%edi
 	movdqa	%xmm7,%xmm1
 	jmp	.L050xts_enc_done
-.align	16
+.balign	16
 .L049xts_enc_four:
 	movaps	%xmm1,%xmm6
 	movups	(%esi),%xmm2
@@ -1277,7 +1294,7 @@
 	leal	64(%edi),%edi
 	movdqa	%xmm6,%xmm1
 	jmp	.L050xts_enc_done
-.align	16
+.balign	16
 .L045xts_enc_done6x:
 	movl	112(%esp),%eax
 	andl	$15,%eax
@@ -1285,7 +1302,7 @@
 	movdqa	%xmm1,%xmm5
 	movl	%eax,112(%esp)
 	jmp	.L053xts_enc_steal
-.align	16
+.balign	16
 .L050xts_enc_done:
 	movl	112(%esp),%eax
 	pxor	%xmm0,%xmm0
@@ -1331,11 +1348,11 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	aesni_xts_encrypt,.-.L_aesni_xts_encrypt_begin
-.globl	aesni_xts_decrypt
-.type	aesni_xts_decrypt,@function
-.align	16
-aesni_xts_decrypt:
+SIZE(aesni_xts_encrypt)
+.globl	SYM(aesni_xts_decrypt)
+TYPEF(aesni_xts_decrypt)
+.balign	16
+SYM(aesni_xts_decrypt):
 .L_aesni_xts_decrypt_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -1387,7 +1404,7 @@
 	shrl	$1,%ecx
 	movl	%ecx,%ebx
 	jmp	.L057xts_dec_loop6
-.align	16
+.balign	16
 .L057xts_dec_loop6:
 	pshufd	$19,%xmm0,%xmm2
 	pxor	%xmm0,%xmm0
@@ -1547,7 +1564,7 @@
 	movups	%xmm6,64(%edi)
 	leal	80(%edi),%edi
 	jmp	.L063xts_dec_done
-.align	16
+.balign	16
 .L059xts_dec_one:
 	movups	(%esi),%xmm2
 	leal	16(%esi),%esi
@@ -1568,7 +1585,7 @@
 	leal	16(%edi),%edi
 	movdqa	%xmm5,%xmm1
 	jmp	.L063xts_dec_done
-.align	16
+.balign	16
 .L060xts_dec_two:
 	movaps	%xmm1,%xmm6
 	movups	(%esi),%xmm2
@@ -1584,7 +1601,7 @@
 	leal	32(%edi),%edi
 	movdqa	%xmm6,%xmm1
 	jmp	.L063xts_dec_done
-.align	16
+.balign	16
 .L061xts_dec_three:
 	movaps	%xmm1,%xmm7
 	movups	(%esi),%xmm2
@@ -1604,7 +1621,7 @@
 	leal	48(%edi),%edi
 	movdqa	%xmm7,%xmm1
 	jmp	.L063xts_dec_done
-.align	16
+.balign	16
 .L062xts_dec_four:
 	movaps	%xmm1,%xmm6
 	movups	(%esi),%xmm2
@@ -1628,14 +1645,14 @@
 	leal	64(%edi),%edi
 	movdqa	%xmm6,%xmm1
 	jmp	.L063xts_dec_done
-.align	16
+.balign	16
 .L058xts_dec_done6x:
 	movl	112(%esp),%eax
 	andl	$15,%eax
 	jz	.L065xts_dec_ret
 	movl	%eax,112(%esp)
 	jmp	.L066xts_dec_only_one_more
-.align	16
+.balign	16
 .L063xts_dec_done:
 	movl	112(%esp),%eax
 	pxor	%xmm0,%xmm0
@@ -1707,11 +1724,11 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	aesni_xts_decrypt,.-.L_aesni_xts_decrypt_begin
-.globl	aesni_cbc_encrypt
-.type	aesni_cbc_encrypt,@function
-.align	16
-aesni_cbc_encrypt:
+SIZE(aesni_xts_decrypt)
+.globl	SYM(aesni_cbc_encrypt)
+TYPEF(aesni_cbc_encrypt)
+.balign	16
+SYM(aesni_cbc_encrypt):
 .L_aesni_cbc_encrypt_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -1740,7 +1757,7 @@
 	jb	.L072cbc_enc_tail
 	subl	$16,%eax
 	jmp	.L073cbc_enc_loop
-.align	16
+.balign	16
 .L073cbc_enc_loop:
 	movups	(%esi),%xmm7
 	leal	16(%esi),%esi
@@ -1778,14 +1795,14 @@
 	movl	%edi,%esi
 	movl	%ebp,%edx
 	jmp	.L073cbc_enc_loop
-.align	16
+.balign	16
 .L071cbc_decrypt:
 	cmpl	$80,%eax
 	jbe	.L076cbc_dec_tail
 	movaps	%xmm7,(%esp)
 	subl	$80,%eax
 	jmp	.L077cbc_dec_loop6_enter
-.align	16
+.balign	16
 .L078cbc_dec_loop6:
 	movaps	%xmm0,(%esp)
 	movups	%xmm7,(%edi)
@@ -1865,7 +1882,7 @@
 	movaps	%xmm6,%xmm2
 	subl	$80,%eax
 	jmp	.L079cbc_dec_tail_collected
-.align	16
+.balign	16
 .L080cbc_dec_one:
 	movups	(%edx),%xmm0
 	movups	16(%edx),%xmm1
@@ -1882,7 +1899,7 @@
 	movaps	%xmm6,%xmm7
 	subl	$16,%eax
 	jmp	.L079cbc_dec_tail_collected
-.align	16
+.balign	16
 .L081cbc_dec_two:
 	xorps	%xmm4,%xmm4
 	call	_aesni_decrypt3
@@ -1894,7 +1911,7 @@
 	movaps	%xmm5,%xmm7
 	subl	$32,%eax
 	jmp	.L079cbc_dec_tail_collected
-.align	16
+.balign	16
 .L082cbc_dec_three:
 	call	_aesni_decrypt3
 	xorps	%xmm7,%xmm2
@@ -1907,7 +1924,7 @@
 	movups	32(%esi),%xmm7
 	subl	$48,%eax
 	jmp	.L079cbc_dec_tail_collected
-.align	16
+.balign	16
 .L083cbc_dec_four:
 	call	_aesni_decrypt4
 	movups	16(%esi),%xmm1
@@ -1928,7 +1945,7 @@
 	jnz	.L085cbc_dec_tail_partial
 	movups	%xmm2,(%edi)
 	jmp	.L075cbc_ret
-.align	16
+.balign	16
 .L085cbc_dec_tail_partial:
 	movaps	%xmm2,(%esp)
 	movl	$16,%ecx
@@ -1945,10 +1962,10 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	aesni_cbc_encrypt,.-.L_aesni_cbc_encrypt_begin
-.type	_aesni_set_encrypt_key,@function
-.align	16
-_aesni_set_encrypt_key:
+SIZE(aesni_cbc_encrypt)
+TYPEF(_aesni_set_encrypt_key)
+.balign	16
+SYM(_aesni_set_encrypt_key):
 	testl	%eax,%eax
 	jz	.L086bad_pointer
 	testl	%edx,%edx
@@ -1962,7 +1979,7 @@
 	je	.L08812rounds
 	cmpl	$128,%ecx
 	jne	.L089bad_keybits
-.align	16
+.balign	16
 .L09010rounds:
 	movl	$9,%ecx
 	movups	%xmm0,-16(%edx)
@@ -1990,7 +2007,7 @@
 	movl	%ecx,80(%edx)
 	xorl	%eax,%eax
 	ret
-.align	16
+.balign	16
 .L092key_128:
 	movups	%xmm0,(%edx)
 	leal	16(%edx),%edx
@@ -2002,7 +2019,7 @@
 	shufps	$255,%xmm1,%xmm1
 	xorps	%xmm1,%xmm0
 	ret
-.align	16
+.balign	16
 .L08812rounds:
 	movq	16(%eax),%xmm2
 	movl	$11,%ecx
@@ -2027,11 +2044,11 @@
 	movl	%ecx,48(%edx)
 	xorl	%eax,%eax
 	ret
-.align	16
+.balign	16
 .L095key_192a:
 	movups	%xmm0,(%edx)
 	leal	16(%edx),%edx
-.align	16
+.balign	16
 .L093key_192a_cold:
 	movaps	%xmm2,%xmm5
 .L096key_192b_warm:
@@ -2047,7 +2064,7 @@
 	pshufd	$255,%xmm0,%xmm3
 	pxor	%xmm3,%xmm2
 	ret
-.align	16
+.balign	16
 .L094key_192b:
 	movaps	%xmm0,%xmm3
 	shufps	$68,%xmm0,%xmm5
@@ -2056,7 +2073,7 @@
 	movups	%xmm3,16(%edx)
 	leal	32(%edx),%edx
 	jmp	.L096key_192b_warm
-.align	16
+.balign	16
 .L08714rounds:
 	movups	16(%eax),%xmm2
 	movl	$13,%ecx
@@ -2093,7 +2110,7 @@
 	movl	%ecx,16(%edx)
 	xorl	%eax,%eax
 	ret
-.align	16
+.balign	16
 .L099key_256a:
 	movups	%xmm2,(%edx)
 	leal	16(%edx),%edx
@@ -2105,7 +2122,7 @@
 	shufps	$255,%xmm1,%xmm1
 	xorps	%xmm1,%xmm0
 	ret
-.align	16
+.balign	16
 .L098key_256b:
 	movups	%xmm0,(%edx)
 	leal	16(%edx),%edx
@@ -2116,35 +2133,35 @@
 	shufps	$170,%xmm1,%xmm1
 	xorps	%xmm1,%xmm2
 	ret
-.align	4
+.balign	4
 .L086bad_pointer:
 	movl	$-1,%eax
 	ret
-.align	4
+.balign	4
 .L089bad_keybits:
 	movl	$-2,%eax
 	ret
-.size	_aesni_set_encrypt_key,.-_aesni_set_encrypt_key
-.globl	aesni_set_encrypt_key
-.type	aesni_set_encrypt_key,@function
-.align	16
-aesni_set_encrypt_key:
+SIZE(_aesni_set_encrypt_key)
+.globl	SYM(aesni_set_encrypt_key)
+TYPEF(aesni_set_encrypt_key)
+.balign	16
+SYM(aesni_set_encrypt_key):
 .L_aesni_set_encrypt_key_begin:
 	movl	4(%esp),%eax
 	movl	8(%esp),%ecx
 	movl	12(%esp),%edx
-	call	_aesni_set_encrypt_key
+	call	SYM(_aesni_set_encrypt_key)
 	ret
-.size	aesni_set_encrypt_key,.-.L_aesni_set_encrypt_key_begin
-.globl	aesni_set_decrypt_key
-.type	aesni_set_decrypt_key,@function
-.align	16
-aesni_set_decrypt_key:
+SIZE(aesni_set_encrypt_key)
+.globl	SYM(aesni_set_decrypt_key)
+TYPEF(aesni_set_encrypt_key)
+.balign	16
+SYM(aesni_set_decrypt_key):
 .L_aesni_set_decrypt_key_begin:
 	movl	4(%esp),%eax
 	movl	8(%esp),%ecx
 	movl	12(%esp),%edx
-	call	_aesni_set_encrypt_key
+	call	SYM(_aesni_set_encrypt_key)
 	movl	12(%esp),%edx
 	shll	$4,%ecx
 	testl	%eax,%eax
@@ -2173,10 +2190,12 @@
 	xorl	%eax,%eax
 .L100dec_key_ret:
 	ret
-.size	aesni_set_decrypt_key,.-.L_aesni_set_decrypt_key_begin
+SIZE(aesni_set_decrypt_key)
 .byte	65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
 .byte	83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
 .byte	32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
 .byte	115,108,46,111,114,103,62,0
 
+#ifdef __linux__
 .section .note.GNU-stack,"",%progbits
+#endif
--- gnutls-3.0.15/lib/accelerated/x86/asm/cpuid-x86.s.orig	2012-03-14 21:33:12.000000000 -0400
+++ gnutls-3.0.15/lib/accelerated/x86/asm/cpuid-x86.s	2012-03-14 22:14:41.000000000 -0400
@@ -18,12 +18,30 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
+
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef __MACH__
+#  define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
+#  define SYM(x) x
+#endif
+
+#ifdef __ELF__
+#  define TYPEF(x) .type SYM(x), @function
+#  define SIZE(x) .size SYM(x), . - SYM(x)
+#else
+#  define TYPEF(x)
+#  define SIZE(x)
+#endif
+
 .file	"devel/perlasm/cpuid-x86.s"
 .text
-.globl	gnutls_cpuid
-.type	gnutls_cpuid,@function
-.align	16
-gnutls_cpuid:
+.globl	SYM(gnutls_cpuid)
+TYPEF(gnutls_cpuid)
+.balign	16
+SYM(gnutls_cpuid):
 .L_gnutls_cpuid_begin:
 	pushl	%ebp
 	movl	%esp,%ebp
@@ -51,11 +69,11 @@
 	movl	%ebp,%esp
 	popl	%ebp
 	ret
-.size	gnutls_cpuid,.-.L_gnutls_cpuid_begin
-.globl	gnutls_have_cpuid
-.type	gnutls_have_cpuid,@function
-.align	16
-gnutls_have_cpuid:
+SIZE(gnutls_cpuid)
+.globl	SYM(gnutls_have_cpuid)
+TYPEF(gnutls_have_cpuid)
+.balign	16
+SYM(gnutls_have_cpuid):
 .L_gnutls_have_cpuid_begin:
 	pushfl
 	popl	%eax
@@ -66,7 +84,9 @@
 	popl	%eax
 	andl	$2097152,%eax
 	ret
-.size	gnutls_have_cpuid,.-.L_gnutls_have_cpuid_begin
+SIZE(gnutls_have_cpuid)
 .byte	67,80,85,73,68,32,102,111,114,32,120,56,54,0
 
+#ifdef __linux__
 .section .note.GNU-stack,"",%progbits
+#endif
--- gnutls-3.0.15/lib/accelerated/x86/asm/padlock-x86.s.orig	2012-03-14 21:33:31.000000000 -0400
+++ gnutls-3.0.15/lib/accelerated/x86/asm/padlock-x86.s	2012-03-14 22:18:22.000000000 -0400
@@ -35,12 +35,31 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef __MACH__
+#  define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
+#  define SYM(x) x
+#endif
+
+#ifdef __ELF__
+#  define TYPEF(x) .type SYM(x), @function
+#  define TYPEO(x) .type SYM(x), @object
+#  define SIZE(x) .size SYM(x), . - SYM(x)
+#else
+#  define TYPEF(x)
+#  define TYPEO(x)
+#  define SIZE(x)
+#endif
+
 .file	"devel/perlasm/e_padlock-x86.s"
 .text
-.globl	padlock_capability
-.type	padlock_capability,@function
-.align	16
-padlock_capability:
+.globl	SYM(padlock_capability)
+TYPEF(padlock_capability)
+.balign	16
+SYM(padlock_capability):
 .L_padlock_capability_begin:
 	pushl	%ebx
 	pushfl
@@ -87,11 +106,11 @@
 .L000noluck:
 	popl	%ebx
 	ret
-.size	padlock_capability,.-.L_padlock_capability_begin
-.globl	padlock_key_bswap
-.type	padlock_key_bswap,@function
-.align	16
-padlock_key_bswap:
+SIZE(padlock_capability)
+.globl	SYM(padlock_key_bswap)
+TYPEF(padlock_key_bswap)
+.balign	16
+SYM(padlock_key_bswap):
 .L_padlock_key_bswap_begin:
 	movl	4(%esp),%edx
 	movl	240(%edx),%ecx
@@ -103,11 +122,11 @@
 	subl	$1,%ecx
 	jnz	.L001bswap_loop
 	ret
-.size	padlock_key_bswap,.-.L_padlock_key_bswap_begin
-.globl	padlock_verify_context
-.type	padlock_verify_context,@function
-.align	16
-padlock_verify_context:
+SIZE(padlock_key_bswap)
+.globl	SYM(padlock_verify_context)
+TYPEF(padlock_verify_context)
+.balign	16
+SYM(padlock_verify_context):
 .L_padlock_verify_context_begin:
 	movl	4(%esp),%edx
 	leal	.Lpadlock_saved_context-.L002verify_pic_point,%eax
@@ -116,9 +135,9 @@
 .L002verify_pic_point:
 	leal	4(%esp),%esp
 	ret
-.size	padlock_verify_context,.-.L_padlock_verify_context_begin
-.type	_padlock_verify_ctx,@function
-.align	16
+SIZE(padlock_verify_context)
+TYPEF(_padlock_verify_ctx)
+.balign	16
 _padlock_verify_ctx:
 	addl	(%esp),%eax
 	btl	$30,4(%esp)
@@ -130,20 +149,20 @@
 .L003verified:
 	movl	%edx,(%eax)
 	ret
-.size	_padlock_verify_ctx,.-_padlock_verify_ctx
-.globl	padlock_reload_key
-.type	padlock_reload_key,@function
-.align	16
-padlock_reload_key:
+SIZE(_padlock_verify_ctx)
+.globl	SYM(padlock_reload_key)
+TYPEF(padlock_reload_key)
+.balign	16
+SYM(padlock_reload_key):
 .L_padlock_reload_key_begin:
 	pushfl
 	popfl
 	ret
-.size	padlock_reload_key,.-.L_padlock_reload_key_begin
-.globl	padlock_aes_block
-.type	padlock_aes_block,@function
-.align	16
-padlock_aes_block:
+SIZE(padlock_reload_key)
+.globl	SYM(padlock_aes_block)
+TYPEF(padlock_aes_block)
+.balign	16
+SYM(padlock_aes_block):
 .L_padlock_aes_block_begin:
 	pushl	%edi
 	pushl	%esi
@@ -159,11 +178,11 @@
 	popl	%esi
 	popl	%edi
 	ret
-.size	padlock_aes_block,.-.L_padlock_aes_block_begin
-.globl	padlock_ecb_encrypt
-.type	padlock_ecb_encrypt,@function
-.align	16
-padlock_ecb_encrypt:
+SIZE(padlock_aes_block)
+.globl	SYM(padlock_ecb_encrypt)
+TYPEF(padlock_ecb_encrypt)
+.balign	16
+SYM(padlock_ecb_encrypt):
 .L_padlock_ecb_encrypt_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -208,7 +227,7 @@
 	leal	(%eax,%ebp,1),%esp
 	andl	$-16,%esp
 	jmp	.L008ecb_loop
-.align	16
+.balign	16
 .L008ecb_loop:
 	movl	%edi,(%ebp)
 	movl	%esi,4(%ebp)
@@ -258,7 +277,7 @@
 .L011ecb_done:
 	leal	24(%ebp),%esp
 	jmp	.L013ecb_exit
-.align	16
+.balign	16
 .L006ecb_short:
 	xorl	%eax,%eax
 	leal	-24(%esp),%ebp
@@ -275,7 +294,7 @@
 	movl	%esp,%esi
 	movl	%ecx,%ebx
 	jmp	.L008ecb_loop
-.align	16
+.balign	16
 .L007ecb_aligned:
 	leal	-16(%edx),%eax
 	leal	16(%edx),%ebx
@@ -290,11 +309,11 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	padlock_ecb_encrypt,.-.L_padlock_ecb_encrypt_begin
-.globl	padlock_cbc_encrypt
-.type	padlock_cbc_encrypt,@function
-.align	16
-padlock_cbc_encrypt:
+SIZE(padlock_ecb_encrypt)
+.globl	SYM(padlock_cbc_encrypt)
+TYPEF(padlock_cbc_encrypt)
+.balign	16
+SYM(padlock_cbc_encrypt):
 .L_padlock_cbc_encrypt_begin:
 	pushl	%ebp
 	pushl	%ebx
@@ -339,7 +358,7 @@
 	leal	(%eax,%ebp,1),%esp
 	andl	$-16,%esp
 	jmp	.L019cbc_loop
-.align	16
+.balign	16
 .L019cbc_loop:
 	movl	%edi,(%ebp)
 	movl	%esi,4(%ebp)
@@ -391,7 +410,7 @@
 .L022cbc_done:
 	leal	24(%ebp),%esp
 	jmp	.L024cbc_exit
-.align	16
+.balign	16
 .L017cbc_short:
 	xorl	%eax,%eax
 	leal	-24(%esp),%ebp
@@ -408,7 +427,7 @@
 	movl	%esp,%esi
 	movl	%ecx,%ebx
 	jmp	.L019cbc_loop
-.align	16
+.balign	16
 .L018cbc_aligned:
 	leal	-16(%edx),%eax
 	leal	16(%edx),%ebx
@@ -425,11 +444,11 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.size	padlock_cbc_encrypt,.-.L_padlock_cbc_encrypt_begin
-.globl	padlock_xstore
-.type	padlock_xstore,@function
-.align	16
-padlock_xstore:
+SIZE(padlock_cbc_encrypt)
+.globl	SYM(padlock_xstore)
+TYPEF(padlock_xstore)
+.balign	16
+SYM(padlock_xstore):
 .L_padlock_xstore_begin:
 	pushl	%edi
 	movl	8(%esp),%edi
@@ -437,9 +456,9 @@
 .byte	15,167,192
 	popl	%edi
 	ret
-.size	padlock_xstore,.-.L_padlock_xstore_begin
-.type	_win32_segv_handler,@function
-.align	16
+SIZE(padlock_xstore)
+TYPEF(_win32_segv_handler)
+.balign	16
 _win32_segv_handler:
 	movl	$1,%eax
 	movl	4(%esp),%edx
@@ -450,11 +469,11 @@
 	movl	$0,%eax
 .L026ret:
 	ret
-.size	_win32_segv_handler,.-_win32_segv_handler
-.globl	padlock_sha1_oneshot
-.type	padlock_sha1_oneshot,@function
-.align	16
-padlock_sha1_oneshot:
+SIZE(_win32_segv_handler)
+.globl	SYM(padlock_sha1_oneshot)
+TYPEF(padlock_sha1_oneshot)
+.balign	16
+SYM(padlock_sha1_oneshot):
 .L_padlock_sha1_oneshot_begin:
 	pushl	%edi
 	pushl	%esi
@@ -481,11 +500,11 @@
 	popl	%esi
 	popl	%edi
 	ret
-.size	padlock_sha1_oneshot,.-.L_padlock_sha1_oneshot_begin
-.globl	padlock_sha1_blocks
-.type	padlock_sha1_blocks,@function
-.align	16
-padlock_sha1_blocks:
+SIZE(padlock_sha1_oneshot)
+.globl	SYM(padlock_sha1_blocks)
+TYPEF(padlock_sha1_blocks)
+.balign	16
+SYM(padlock_sha1_blocks):
 .L_padlock_sha1_blocks_begin:
 	pushl	%edi
 	pushl	%esi
@@ -511,11 +530,11 @@
 	popl	%esi
 	popl	%edi
 	ret
-.size	padlock_sha1_blocks,.-.L_padlock_sha1_blocks_begin
-.globl	padlock_sha256_oneshot
-.type	padlock_sha256_oneshot,@function
-.align	16
-padlock_sha256_oneshot:
+SIZE(padlock_sha1_blocks)
+.globl	SYM(padlock_sha256_oneshot)
+TYPEF(padlock_sha256_oneshot)
+.balign	16
+SYM(padlock_sha256_oneshot):
 .L_padlock_sha256_oneshot_begin:
 	pushl	%edi
 	pushl	%esi
@@ -542,11 +561,11 @@
 	popl	%esi
 	popl	%edi
 	ret
-.size	padlock_sha256_oneshot,.-.L_padlock_sha256_oneshot_begin
-.globl	padlock_sha256_blocks
-.type	padlock_sha256_blocks,@function
-.align	16
-padlock_sha256_blocks:
+SIZE(padlock_sha256_oneshot)
+.globl	SYM(padlock_sha256_blocks)
+TYPEF(padlock_sha256_blocks)
+.balign	16
+SYM(padlock_sha256_blocks):
 .L_padlock_sha256_blocks_begin:
 	pushl	%edi
 	pushl	%esi
@@ -572,11 +591,11 @@
 	popl	%esi
 	popl	%edi
 	ret
-.size	padlock_sha256_blocks,.-.L_padlock_sha256_blocks_begin
-.globl	padlock_sha512_blocks
-.type	padlock_sha512_blocks,@function
-.align	16
-padlock_sha512_blocks:
+SIZE(padlock_sha256_blocks)
+.globl	SYM(padlock_sha512_blocks)
+TYPEF(padlock_sha512_blocks)
+.balign	16
+SYM(padlock_sha512_blocks):
 .L_padlock_sha512_blocks_begin:
 	pushl	%edi
 	pushl	%esi
@@ -609,15 +628,17 @@
 	popl	%esi
 	popl	%edi
 	ret
-.size	padlock_sha512_blocks,.-.L_padlock_sha512_blocks_begin
+SIZE(padlock_sha512_blocks)
 .byte	86,73,65,32,80,97,100,108,111,99,107,32,120,56,54,32
 .byte	109,111,100,117,108,101,44,32,67,82,89,80,84,79,71,65
 .byte	77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101
 .byte	110,115,115,108,46,111,114,103,62,0
-.align	16
+.balign	16
 .data
-.align	4
+.balign	4
 .Lpadlock_saved_context:
 .long	0
 
+#ifdef __linux__
 .section .note.GNU-stack,"",%progbits
+#endif
