From: Kelvin Lee Date: Mon, 24 Jun 2024 11:09:03 +0000 (+1000) Subject: MASM: Need to strip arguments after .pdata or .xdata X-Git-Tag: openssl-3.4.0-alpha1~446 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0169bbbd1ce94ea703d5561b30f0e41bb54520a6;p=thirdparty%2Fopenssl.git MASM: Need to strip arguments after .pdata or .xdata For MASM, .section .pdata,"r" got translated to: .pdata,"r" SEGMENT READONLY ALIGN(4) that breaks ml64. Previous version of x86_64-xlate.pl did strip that ',"r"'. CLA: trivial Reviewed-by: Matt Caswell Reviewed-by: Sasa Nedvedicky Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/24714) --- diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index 3befbde0194..f9935dd9aa9 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -1012,6 +1012,7 @@ my %globals; $align = $$line; $align =~ s/(.*)(align\s*=\s*\d+$)/$2/; $$line =~ s/(.*)(\s+align\s*=\s*\d+$)/$1/; + $$line =~ s/,.*//; $$line = ".CRT\$XCU" if ($$line eq ".init"); $$line = ".rdata" if ($$line eq ".rodata"); if ($nasm) {