From 650cf9e91c9b18210aaa53983bfb7725a344b7bb Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 17 Jan 2026 06:31:45 +0000 Subject: Use .section before .rodata to appease gas. gas dislikes bare .rodata - add .section before .rodata to make it happier (LLVM does not care and is happy with either). For consistency, do the same with .text. --- src/lib/libcrypto/sha/sha1_aarch64_ce.S | 4 ++-- src/lib/libcrypto/sha/sha1_amd64_generic.S | 4 ++-- src/lib/libcrypto/sha/sha1_amd64_shani.S | 6 +++--- src/lib/libcrypto/sha/sha256_aarch64_ce.S | 7 ++++--- src/lib/libcrypto/sha/sha256_amd64_generic.S | 7 ++++--- src/lib/libcrypto/sha/sha256_amd64_shani.S | 6 +++--- src/lib/libcrypto/sha/sha512_aarch64_ce.S | 7 ++++--- src/lib/libcrypto/sha/sha512_amd64_generic.S | 7 ++++--- 8 files changed, 26 insertions(+), 22 deletions(-) (limited to 'src/lib/libcrypto') diff --git a/src/lib/libcrypto/sha/sha1_aarch64_ce.S b/src/lib/libcrypto/sha/sha1_aarch64_ce.S index bef969ca4e..ce7eb81115 100644 --- a/src/lib/libcrypto/sha/sha1_aarch64_ce.S +++ b/src/lib/libcrypto/sha/sha1_aarch64_ce.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sha1_aarch64_ce.S,v 1.2 2026/01/17 06:23:42 jsing Exp $ */ +/* $OpenBSD: sha1_aarch64_ce.S,v 1.3 2026/01/17 06:31:45 jsing Exp $ */ /* * Copyright (c) 2023,2025 Joel Sing * @@ -99,7 +99,7 @@ .arch armv8-a+sha2 -.text +.section .text /* * void sha1_block_ce(SHA256_CTX *ctx, const void *in, size_t num); diff --git a/src/lib/libcrypto/sha/sha1_amd64_generic.S b/src/lib/libcrypto/sha/sha1_amd64_generic.S index 38f49b0c3c..685d71edf8 100644 --- a/src/lib/libcrypto/sha/sha1_amd64_generic.S +++ b/src/lib/libcrypto/sha/sha1_amd64_generic.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sha1_amd64_generic.S,v 1.2 2025/01/18 02:56:07 jsing Exp $ */ +/* $OpenBSD: sha1_amd64_generic.S,v 1.3 2026/01/17 06:31:45 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -156,7 +156,7 @@ sha1_message_schedule_update(idx, %rsp, tmp0) \ sha1_round_parity(a, b, c, d, e, 0xca62c1d6, tmp0) -.text +.section .text /* * void sha1_block_generic(SHA1_CTX *ctx, const void *in, size_t num); diff --git a/src/lib/libcrypto/sha/sha1_amd64_shani.S b/src/lib/libcrypto/sha/sha1_amd64_shani.S index d7699d10f1..751554f1d5 100644 --- a/src/lib/libcrypto/sha/sha1_amd64_shani.S +++ b/src/lib/libcrypto/sha/sha1_amd64_shani.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sha1_amd64_shani.S,v 1.1 2024/12/06 11:57:18 jsing Exp $ */ +/* $OpenBSD: sha1_amd64_shani.S,v 1.2 2026/01/17 06:31:45 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -71,7 +71,7 @@ sha1_shani_round(fn, xm0, xe, xe_next); -.text +.section .text /* * void sha1_block_shani(SHA256_CTX *ctx, const void *in, size_t num); @@ -157,7 +157,7 @@ sha1_block_shani: ret -.rodata +.section .rodata /* * Shuffle mask - byte reversal for little endian to big endian word conversion, diff --git a/src/lib/libcrypto/sha/sha256_aarch64_ce.S b/src/lib/libcrypto/sha/sha256_aarch64_ce.S index 1d9bb2e03e..b66969427b 100644 --- a/src/lib/libcrypto/sha/sha256_aarch64_ce.S +++ b/src/lib/libcrypto/sha/sha256_aarch64_ce.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sha256_aarch64_ce.S,v 1.3 2026/01/17 06:23:42 jsing Exp $ */ +/* $OpenBSD: sha256_aarch64_ce.S,v 1.4 2026/01/17 06:31:45 jsing Exp $ */ /* * Copyright (c) 2023,2025 Joel Sing * @@ -84,7 +84,7 @@ .arch armv8-a+sha2 -.text +.section .text /* * void sha256_block_ce(SHA256_CTX *ctx, const void *in, size_t num); @@ -163,10 +163,11 @@ sha256_block_ce: ret +.section .rodata + /* * SHA-256 constants - see FIPS 180-4 section 4.2.3. */ -.rodata .align 4 .type K256,@object K256: diff --git a/src/lib/libcrypto/sha/sha256_amd64_generic.S b/src/lib/libcrypto/sha/sha256_amd64_generic.S index 166bce9ca8..a5bb3eca42 100644 --- a/src/lib/libcrypto/sha/sha256_amd64_generic.S +++ b/src/lib/libcrypto/sha/sha256_amd64_generic.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sha256_amd64_generic.S,v 1.3 2024/11/16 12:34:16 jsing Exp $ */ +/* $OpenBSD: sha256_amd64_generic.S,v 1.4 2026/01/17 06:31:45 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -143,7 +143,7 @@ sha256_message_schedule_update(idx, %rsp, tmp0) \ sha256_round(idx, a, b, c, d, e, f, g, h, k256, %rsp, tmp0) -.text +.section .text /* * void sha256_block_generic(SHA256_CTX *ctx, const void *in, size_t num); @@ -276,10 +276,11 @@ sha256_block_generic: ret +.section .rodata + /* * SHA-256 constants - see FIPS 180-4 section 4.2.2. */ -.rodata .align 64 .type K256,@object K256: diff --git a/src/lib/libcrypto/sha/sha256_amd64_shani.S b/src/lib/libcrypto/sha/sha256_amd64_shani.S index df3a796b45..e43ecfa51f 100644 --- a/src/lib/libcrypto/sha/sha256_amd64_shani.S +++ b/src/lib/libcrypto/sha/sha256_amd64_shani.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sha256_amd64_shani.S,v 1.1 2024/11/16 15:31:36 jsing Exp $ */ +/* $OpenBSD: sha256_amd64_shani.S,v 1.2 2026/01/17 06:31:45 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -80,7 +80,7 @@ movdqa xmt0, xmsg; \ sha256_shani_round(idx); -.text +.section .text /* * void sha256_block_shani(SHA256_CTX *ctx, const void *in, size_t num); @@ -173,7 +173,7 @@ sha256_block_shani: ret -.rodata +.section .rodata /* * Shuffle mask - little endian to big endian word conversion. diff --git a/src/lib/libcrypto/sha/sha512_aarch64_ce.S b/src/lib/libcrypto/sha/sha512_aarch64_ce.S index 2d41e699ce..bec56a49e5 100644 --- a/src/lib/libcrypto/sha/sha512_aarch64_ce.S +++ b/src/lib/libcrypto/sha/sha512_aarch64_ce.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sha512_aarch64_ce.S,v 1.2 2026/01/17 06:23:42 jsing Exp $ */ +/* $OpenBSD: sha512_aarch64_ce.S,v 1.3 2026/01/17 06:31:45 jsing Exp $ */ /* * Copyright (c) 2023,2025 Joel Sing * @@ -151,7 +151,7 @@ .arch armv8-a+sha3 -.text +.section .text /* * void sha512_block_ce(SHA512_CTX *ctx, const void *in, size_t num); @@ -282,10 +282,11 @@ sha512_block_ce: ret +.section .rodata + /* * SHA-512 constants - see FIPS 180-4 section 4.2.3. */ -.rodata .align 4 .type K512,@object K512: diff --git a/src/lib/libcrypto/sha/sha512_amd64_generic.S b/src/lib/libcrypto/sha/sha512_amd64_generic.S index 8419d60b8e..3b6a9719e1 100644 --- a/src/lib/libcrypto/sha/sha512_amd64_generic.S +++ b/src/lib/libcrypto/sha/sha512_amd64_generic.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sha512_amd64_generic.S,v 1.1 2024/11/16 14:56:39 jsing Exp $ */ +/* $OpenBSD: sha512_amd64_generic.S,v 1.2 2026/01/17 06:31:45 jsing Exp $ */ /* * Copyright (c) 2024 Joel Sing * @@ -144,7 +144,7 @@ sha512_message_schedule_update(idx, %rsp, tmp0) \ sha512_round(idx, a, b, c, d, e, f, g, h, k512, %rsp, tmp0) -.text +.section .text /* * void sha512_block_generic(SHA512_CTX *ctx, const void *in, size_t num); @@ -277,10 +277,11 @@ sha512_block_generic: ret +.section .rodata + /* * SHA-512 constants - see FIPS 180-4 section 4.2.3. */ -.rodata .align 64 .type K512,@object K512: -- cgit v1.2.3-55-g6feb