darwin data sections can have wild prefixes and suffixes.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 10 Sep 2014 18:02:44 +0000 (14:02 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 10 Sep 2014 18:46:30 +0000 (14:46 -0400)
t/porting/libperl.t

index 366bfd9..83ff567 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,__(const|data|bss|common)\) (?: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