[09/20] Convert .ltorg properly for armasm

Message ID 1395664691-60544-9-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö March 24, 2014, 12:38 p.m.
---
 gas-preprocessor.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Janne Grunau March 24, 2014, 3:02 p.m. | #1
On 2014-03-24 14:38:00 +0200, Martin Storsjö wrote:
> ---
>  gas-preprocessor.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 5498b7c..6274571 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -914,7 +914,8 @@ foreach my $line (@pass1_lines) {
>      $line =~ s/\.func/$comm$&/x        if $as_type =~ /^(apple-|clang)/;
>      $line =~ s/\.endfunc/$comm$&/x     if $as_type =~ /^(apple-|clang)/;
>      $line =~ s/\.endfunc/ENDP/x        if $as_type =~ /armasm/;
> -    $line =~ s/\.ltorg/$comm$&/x       if $as_type =~ /^(apple-|clang|armasm)/;
> +    $line =~ s/\.ltorg/$comm$&/x       if $as_type =~ /^(apple-|clang)/;
> +    $line =~ s/\.ltorg/LTORG/x         if $as_type =~ /armasm/;

could be if $as_type eq "armasm", ok either way

Janne

Patch

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 5498b7c..6274571 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -914,7 +914,8 @@  foreach my $line (@pass1_lines) {
     $line =~ s/\.func/$comm$&/x        if $as_type =~ /^(apple-|clang)/;
     $line =~ s/\.endfunc/$comm$&/x     if $as_type =~ /^(apple-|clang)/;
     $line =~ s/\.endfunc/ENDP/x        if $as_type =~ /armasm/;
-    $line =~ s/\.ltorg/$comm$&/x       if $as_type =~ /^(apple-|clang|armasm)/;
+    $line =~ s/\.ltorg/$comm$&/x       if $as_type =~ /^(apple-|clang)/;
+    $line =~ s/\.ltorg/LTORG/x         if $as_type =~ /armasm/;
     $line =~ s/\.size/$comm$&/x        if $as_type =~ /^(apple-|armasm)/;
     $line =~ s/\.fpu/$comm$&/x         if $as_type =~ /^(apple-|armasm)/;
     $line =~ s/\.arch/$comm$&/x        if $as_type =~ /^(apple-|clang|armasm)/;