diff options
author | Johann <johannkoenig@google.com> | 2011-12-14 11:44:21 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2011-12-14 11:44:21 -0800 |
commit | 24beb58dd5f7e4b497a46abc7690c1ac7bddff3b (patch) | |
tree | 47ea7f4e3073a9ccc6b169b7856c73ceeada1828 /build/make/ads2gas_apple.pl | |
parent | e542627b0c5a5e5e121ccac3f9eff649d5e38f08 (diff) | |
parent | 8bc60e47490abd415a3906347f1dc71707320360 (diff) | |
download | libvpx-24beb58dd5f7e4b497a46abc7690c1ac7bddff3b.tar libvpx-24beb58dd5f7e4b497a46abc7690c1ac7bddff3b.tar.gz libvpx-24beb58dd5f7e4b497a46abc7690c1ac7bddff3b.tar.bz2 libvpx-24beb58dd5f7e4b497a46abc7690c1ac7bddff3b.zip |
Merge "Fix iOS conversion script"
Diffstat (limited to 'build/make/ads2gas_apple.pl')
-rwxr-xr-x | build/make/ads2gas_apple.pl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/build/make/ads2gas_apple.pl b/build/make/ads2gas_apple.pl index a9740a826..81280bf78 100755 --- a/build/make/ads2gas_apple.pl +++ b/build/make/ads2gas_apple.pl @@ -30,6 +30,8 @@ my @mapping_list = ("\$0", "\$1", "\$2", "\$3", "\$4", "\$5", "\$6", "\$7", "\$8 my @incoming_array; +my @imported_functions; + # Perl trim function to remove whitespace from the start and end of the string sub trim($) { @@ -132,7 +134,18 @@ while (<STDIN>) # Make function visible to linker, and make additional symbol with # prepended underscore s/EXPORT\s+\|([\$\w]*)\|/.globl _$1\n\t.globl $1/; - s/IMPORT\s+\|([\$\w]*)\|/.globl $1/; + + # Prepend imported functions with _ + if (s/IMPORT\s+\|([\$\w]*)\|/.globl $1/) + { + $function = trim($1); + push(@imported_functions, $function); + } + + foreach $function (@imported_functions) + { + s/$function/_$function/; + } # No vertical bars required; make additional symbol with prepended # underscore |