From 89096d950af6a1adec71c4900061b879e7d8a1c8 Mon Sep 17 00:00:00 2001 From: kettenis Date: Mon, 16 Jan 2023 10:11:39 +0000 Subject: [PATCH] Don't put data in .text. ok deraadt@, miod@ --- sys/arch/arm64/arm64/aesv8-armx.S | 11 ++++++++--- 1 file 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 * 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 -- 2.20.1