From 0169bbbd1ce94ea703d5561b30f0e41bb54520a6 Mon Sep 17 00:00:00 2001 From: Kelvin Lee Date: Mon, 24 Jun 2024 21:09:03 +1000 Subject: [PATCH] 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) --- crypto/perlasm/x86_64-xlate.pl | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.47.2