The leading underscore is optional in Darwin.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 6 Oct 2014 18:02:14 +0000 (20:02 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 6 Oct 2014 20:45:33 +0000 (22:45 +0200)
t/porting/libperl.t

index b052239..550a97b 100644 (file)
@@ -252,7 +252,7 @@ sub nm_parse_darwin {
                 $symbols->{data}{const}{$symbol}{$symbols->{o}}++;
             } elsif (/^\(__TEXT,__text\) (?:non-)?external _(\w+)$/) {
                 $symbols->{text}{$1}{$symbols->{o}}++;
-            } elsif (/^\(__DATA,__\w*?(const|data|bss|common)\w*\) (?:non-)?external _(\w+)(\.\w+)?$/) {
+            } elsif (/^\(__DATA,__\w*?(const|data|bss|common)\w*\) (?:non-)?external _?(\w+)(\.\w+)?$/) {
                 my ($dtype, $symbol, $suffix) = ($1, $2, $3);
                 # Ignore function-local constants like
                 # _Perl_pp_gmtime.dayname