summaryrefslogtreecommitdiff
path: root/build/make
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-07-22 00:05:06 -0400
committerJohn Koleszar <jkoleszar@google.com>2011-07-22 00:05:06 -0400
commit7d44c805cfc3aefb8b0850f2e3fca159439aea68 (patch)
treee74f1b6fbeb61c2a754b3f2de1e83fa9aa45b7d1 /build/make
parent06e9386422c1b64b3fc2973b7c0ffd6546285b80 (diff)
parent52d13777daa3317d23733a03c3a6402ec3baf8d0 (diff)
downloadlibvpx-7d44c805cfc3aefb8b0850f2e3fca159439aea68.tar
libvpx-7d44c805cfc3aefb8b0850f2e3fca159439aea68.tar.gz
libvpx-7d44c805cfc3aefb8b0850f2e3fca159439aea68.tar.bz2
libvpx-7d44c805cfc3aefb8b0850f2e3fca159439aea68.zip
Merge remote branch 'internal/upstream' into HEAD
Diffstat (limited to 'build/make')
-rwxr-xr-xbuild/make/ads2gas.pl26
1 files changed, 23 insertions, 3 deletions
diff --git a/build/make/ads2gas.pl b/build/make/ads2gas.pl
index be4658253..388133aa2 100755
--- a/build/make/ads2gas.pl
+++ b/build/make/ads2gas.pl
@@ -21,6 +21,9 @@ print "@ This file was created from a .asm file\n";
print "@ using the ads2gas.pl script.\n";
print "\t.equ DO1STROUNDING, 0\n";
+# Stack of procedure names.
+@proc_stack = ();
+
while (<STDIN>)
{
# Load and store alignment
@@ -133,9 +136,23 @@ while (<STDIN>)
# Strip PRESERVE8
s/\sPRESERVE8/@ PRESERVE8/g;
- # Strip PROC and ENDPROC
- s/\sPROC/@/g;
- s/\sENDP/@/g;
+ # Use PROC and ENDP to give the symbols a .size directive.
+ # This makes them show up properly in debugging tools like gdb and valgrind.
+ if (/\bPROC\b/)
+ {
+ my $proc;
+ /^_([\.0-9A-Z_a-z]\w+)\b/;
+ $proc = $1;
+ push(@proc_stack, $proc) if ($proc);
+ s/\bPROC\b/@ $&/;
+ }
+ if (/\bENDP\b/)
+ {
+ my $proc;
+ s/\bENDP\b/@ $&/;
+ $proc = pop(@proc_stack);
+ $_ = "\t.size $proc, .-$proc".$_ if ($proc);
+ }
# EQU directive
s/(.*)EQU(.*)/.equ $1, $2/;
@@ -154,3 +171,6 @@ while (<STDIN>)
next if /^\s*END\s*$/;
print;
}
+
+# Mark that this object doesn't need an executable stack.
+printf ("\t.section\t.note.GNU-stack,\"\",\%\%progbits\n");