[libav-commits] Change local symbol names to plain L prefix

Mans Rullgard git at libav.org
Fri Oct 19 21:32:41 CEST 2012


Module: libav.org
Branch: master
Commit: d5ddbc78883b1321ead5c972b13ee9614f8913fa

Author:    Mans Rullgard <mans at mansr.com>
Committer: Mans Rullgard <mans at mansr.com>
Date:      Tue Oct  2 21:52:24 2012 +0100

Change local symbol names to plain L prefix

Mach-o uses L (without a dot) as the local symbol prefix.

Signed-off-by: Mans Rullgard <mans at mansr.com>

---

 gas-preprocessor.pl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 0ad7d81..1b1d28c 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -400,7 +400,7 @@ foreach my $line (@pass1_lines) {
     if ($line =~ /(.*)\s*ldr([\w\s\d]+)\s*,\s*=(.*)/) {
         my $label = $literal_labels{$3};
         if (!$label) {
-            $label = ".Literal_$literal_num";
+            $label = "Literal_$literal_num";
             $literal_num++;
             $literal_labels{$3} = $label;
         }
@@ -413,6 +413,9 @@ foreach my $line (@pass1_lines) {
         %literal_labels = ();
     }
 
+    # mach-o local symbol names start with L (no dot)
+    $line =~ s/(?<!\w)\.(L\w+)/$1/g;
+
     # @l -> lo16()  @ha -> ha16()
     $line =~ s/,\s+([^,]+)\@l\b/, lo16($1)/g;
     $line =~ s/,\s+([^,]+)\@ha\b/, ha16($1)/g;



More information about the libav-commits mailing list