Skip to content

Commit

Permalink
asm/x86_64-xlate.pl: make run-time switch labels private on MacOS.
Browse files Browse the repository at this point in the history
Fixes #209.
  • Loading branch information
dot-asm committed May 30, 2024
1 parent c9ea135 commit 77c7244
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/asm/x86_64-xlate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@
$ret = $self;
$$line = substr($$line,@+[0]); $$line =~ s/^\s+//;

$self->{value} =~ s/^(\w+\$\w*)/$decor\1/ if ($flavour eq "macosx");
$self->{value} =~ s/^\.L/$decor/;
}
$ret;
Expand Down Expand Up @@ -508,6 +509,9 @@

$self->{value} =~ s/\@PLT// if (!$elf);
$self->{value} =~ s/([_a-z][_a-z0-9\$]*)/$globals{$1} or $1/gei;
if ($flavour eq "macosx" and $self->{value} !~ /\.L/) {
$self->{value} =~ s/(\w+\$\w*)/$decor\1/g;
}
$self->{value} =~ s/\.L/$decor/g;
$self->{opcode} = $opcode;
}
Expand Down

0 comments on commit 77c7244

Please sign in to comment.