From 6cca12ac0c10ca8752d1788ee44891261c0f272a Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 9 Mar 2024 18:24:32 +0100 Subject: [PATCH] asm/sha256-x86_64.pl: move K256 to .rodata segment. OpenBSD kernel appears to refuse to wire .text pages upon data load. --- src/asm/sha256-portable-x86_64.pl | 1 + src/asm/sha256-x86_64.pl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/asm/sha256-portable-x86_64.pl b/src/asm/sha256-portable-x86_64.pl index dcf295af..91f75c74 100755 --- a/src/asm/sha256-portable-x86_64.pl +++ b/src/asm/sha256-portable-x86_64.pl @@ -246,6 +246,7 @@ () .size $func,.-$func #ifndef __BLST_PORTABLE__ +.section .rodata .align 64 .type $TABLE,\@object $TABLE: diff --git a/src/asm/sha256-x86_64.pl b/src/asm/sha256-x86_64.pl index 800e5716..4a8d138e 100755 --- a/src/asm/sha256-x86_64.pl +++ b/src/asm/sha256-x86_64.pl @@ -62,8 +62,8 @@ $code=<<___; .comm __blst_platform_cap,4 -.text +.section .rodata .align 64 .type $TABLE,\@object $TABLE: @@ -88,6 +88,7 @@ .long 0x03020100,0x0b0a0908,0xffffffff,0xffffffff .long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 .asciz "SHA256 block transform for x86_64, CRYPTOGAMS by \@dot-asm" +.text ___ ######################################################################