https://github.com/openssl/openssl/issues/23528 --- openssl-3.4.0/crypto/perlasm/x86gas.pl.orig +++ openssl-3.4.0/crypto/perlasm/x86gas.pl @@ -167,10 +167,14 @@ } } if (grep {/\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out) { - my $tmp=".comm\t${nmdecor}OPENSSL_ia32cap_P,16"; - if ($::macosx) { push (@out,"$tmp,2\n"); } - elsif ($::elf) { push (@out,"$tmp,4\n"); } - else { push (@out,"$tmp\n"); } + if (grep {/\.hidden.*\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out) + { my $tmp=".comm\t${nmdecor}OPENSSL_ia32cap_P,16"; + if ($::macosx) { push (@out,"$tmp,2\n"); } + elsif ($::elf) { push (@out,"$tmp,4\n"); } + else { push (@out,"$tmp\n"); } + } + else + { push (@out,".extern\t${nmdecor}OPENSSL_ia32cap_P\n"); } } push(@out,$initseg) if ($initseg); if ($::elf) {