summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2023-01-16 10:11:40 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2023-01-16 10:11:40 +0000
commit74aef5db2ee885d31511a773cdbe12b87824ab8c (patch)
treec28f9b9ae9d7fec2f5644428fc38717645e29ad6 /sys
parent3c0f13b776ad481f2a454b9fb5930197fd07344e (diff)
Don't put data in .text.
ok deraadt@, miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm64/arm64/aesv8-armx.S11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/arm64/arm64/aesv8-armx.S b/sys/arch/arm64/arm64/aesv8-armx.S
index d62cfcdd40f..1bc271cfc60 100644
--- a/sys/arch/arm64/arm64/aesv8-armx.S
+++ b/sys/arch/arm64/arm64/aesv8-armx.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: aesv8-armx.S,v 1.1 2021/02/21 14:55:16 tobhe Exp $ */
+/* $OpenBSD: aesv8-armx.S,v 1.2 2023/01/16 10:11:39 kettenis Exp $ */
/*
* Copyright (c) 2006, CRYPTOGAMS by <appro@openssl.org>
* All rights reserved.
@@ -47,13 +47,17 @@
*/
.arch armv8-a+crypto
-.text
+
+.rodata
+
.align 5
.Lrcon:
.long 0x01,0x01,0x01,0x01
.long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d // rotate-n-splat
.long 0x1b,0x1b,0x1b,0x1b
+.text
+
.globl aes_v8_set_encrypt_key
.type aes_v8_set_encrypt_key,%function
.align 5
@@ -74,7 +78,8 @@ aes_v8_set_encrypt_key:
tst w1,#0x3f
b.ne .Lenc_key_abort
- adr x3,.Lrcon
+ adrp x3,.Lrcon
+ add x3,x3,:lo12:.Lrcon
cmp w1,#192
eor v0.16b,v0.16b,v0.16b