[openssl/openssl] 380d6a: keccak1600x4-avx512vl: fix undefined symbols on macOS

"'Richard Levitte' via openssl-commits" <[email protected]> Tue, 14 Jul 2026 05:35:37 -0700
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 380d6afcb3737da1e50709e84e538a9125cdb948
      https://github.com/openssl/openssl/commit/380d6afcb3737da1e50709e84e538a9125cdb948
  Author: Richard Levitte <[email protected]>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M crypto/sha/asm/keccak1600x4-avx512vl.pl

  Log Message:
  -----------
  keccak1600x4-avx512vl: fix undefined symbols on macOS

The one-shot SHAKE x4 wrappers call the incremental absorb and squeeze
routines through call_internal(), which on non-Win64 emitted a call to
the public global symbol by its bare name.  These calls textually
precede the callees' .globl declarations, so x86_64-xlate.pl never
prepends the platform's leading underscore to the referenced symbol.

On ELF (Linux) that is harmless since symbols carry no leading
underscore, but on Mach-O (macOS) the call references the un-decorated
SHA3_shake*_x4_inc_*_avx512vl while the defined symbol is
_SHA3_shake*_x4_inc_*_avx512vl, leaving four undefined externals and
breaking the darwin64-x86_64 link of libcrypto:

  SHA3_shake128_x4_inc_absorb_avx512vl
  SHA3_shake256_x4_inc_absorb_avx512vl
  SHA3_shake128_x4_inc_squeeze_avx512vl
  SHA3_shake256_x4_inc_squeeze_avx512vl

Call the local .L_<name> entry label instead -- the same address as the
public symbol and the pattern the finalize calls already use -- so the
reference resolves locally and these internal routines cannot be
interposed.  The Win64 path is unchanged.

Fixes: https://github.com/openssl/openssl/issues/31941
Fixes: a248ec771e ("ML-DSA: Add AVX512VL SHAKE x4 multi-buffer integration")
Assisted-by: Pi:z-ai/glm-5.2

Reviewed-by: Milan Broz <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Tue Jul 14 12:33:50 2026
(Merged from https://github.com/openssl/openssl/pull/31942)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/ac946a-380d6a%40github.com.