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 <matt@openssl.org>
Reviewed-by: Sasa Nedvedicky <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24714)
This commit is contained in:
Kelvin Lee 2024-06-24 21:09:03 +10:00 committed by Tomas Mraz
parent 55c1458303
commit 0169bbbd1c

View File

@ -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) {