34 lines
1.3 KiB
Text
34 lines
1.3 KiB
Text
Index: crypto/perlasm/x86_64-xlate.pl
|
|
--- crypto/perlasm/x86_64-xlate.pl.orig
|
|
+++ crypto/perlasm/x86_64-xlate.pl
|
|
@@ -788,6 +788,9 @@ my %globals;
|
|
} elsif ($dir eq ".section") {
|
|
$current_segment=$$line;
|
|
if (!$elf && $current_segment eq ".init") {
|
|
+ if ($flavour eq "macosx") { $self->{value} = ".section\t__DATA,__const"; }
|
|
+ }
|
|
+ if (!$elf && $current_segment eq ".init") {
|
|
if ($flavour eq "macosx") { $self->{value} = ".mod_init_func"; }
|
|
elsif ($flavour eq "mingw64") { $self->{value} = ".section\t.ctors"; }
|
|
}
|
|
@@ -839,9 +842,10 @@ my %globals;
|
|
/\.section/ && do { my $v=undef;
|
|
$$line =~ s/([^,]*).*/$1/;
|
|
$$line = ".CRT\$XCU" if ($$line eq ".init");
|
|
+ $$line = ".rdata" if ($$line eq ".rodata");
|
|
if ($nasm) {
|
|
$v="section $$line";
|
|
- if ($$line=~/\.([px])data/) {
|
|
+ if ($$line=~/\.([prx])data/) {
|
|
$v.=" rdata align=";
|
|
$v.=$1 eq "p"? 4 : 8;
|
|
} elsif ($$line=~/\.CRT\$/i) {
|
|
@@ -850,7 +854,7 @@ my %globals;
|
|
} else {
|
|
$v="$current_segment\tENDS\n" if ($current_segment);
|
|
$v.="$$line\tSEGMENT";
|
|
- if ($$line=~/\.([px])data/) {
|
|
+ if ($$line=~/\.([prx])data/) {
|
|
$v.=" READONLY";
|
|
$v.=" ALIGN(".($1 eq "p" ? 4 : 8).")" if ($masm>=$masmref);
|
|
} elsif ($$line=~/\.CRT\$/i) {
|