media/libtheora/bug752139-r18031.patch
author Sven Sauleau <ssauleau@igalia.com>
Tue, 05 Mar 2019 12:19:31 +0000
changeset 522212 64cc60d52a04d0c97162b18b4c3c744a11684e41
parent 97353 7a7c6d1e67e00fd1e712cdcdfcb939c01c3ba9a4
permissions -rw-r--r--
Bug 1526694 [wpt PR 15276] - [wasm] update js-api test runner and expectations, a=testonly Automatic update from web-platform-tests [wasm] update js-api test runner and expectations wasm-module-builder: - consistently adds the end opcode in function bodies (using addBody). - add missing setTableLength method table/get-set: - Avoid unrelated errors like: Cannot destructure property `fn` of 'undefined' or 'null'. Bug: 926311, v8:8319 Change-Id: Ia7db1ee5c3a9b1c1d6092cdce8885ddee4dd9b0e Reviewed-on: https://chromium-review.googlesource.com/c/1458099 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Sven Sauleau <ssauleau@igalia.com> Cr-Commit-Position: refs/heads/master@{#633121} -- wpt-commits: 22400f9755a49a50632a8f2067cb06bca74efff8 wpt-pr: 15276

diff --git a/media/libtheora/lib/arm/arm2gnu.pl b/media/libtheora/lib/arm/arm2gnu.pl
--- a/media/libtheora/lib/arm/arm2gnu.pl
+++ b/media/libtheora/lib/arm/arm2gnu.pl
@@ -1,11 +1,14 @@
 #!/usr/bin/perl
 
 my $bigend;  # little/big endian
+my $nxstack;
+
+$nxstack = 0;
 
 eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
     if $running_under_some_shell;
 
 while ($ARGV[0] =~ /^-/) {
     $_ = shift;
   last if /^--/;
     if (/^-n/) {
@@ -77,16 +80,19 @@ while (<>) {
     if ( /\bMEND\b/ ) {
       s/\bMEND\b/.endm/;
       $n=0;
     }
 
     # ".rdata" doesn't work in 'as' version 2.13.2, as it is ".rodata" there.
     #
     if ( /\bAREA\b/ ) {
+        if ( /CODE/ ) {
+            $nxstack = 1;
+        }
         s/^(.+)CODE(.+)READONLY(.*)/    .text/;
         s/^(.+)DATA(.+)READONLY(.*)/    .section .rdata\n    .align 2/;
         s/^(.+)\|\|\.data\|\|(.+)/    .data\n    .align 2/;
         s/^(.+)\|\|\.bss\|\|(.+)/    .bss/;
     }
 
     s/\|\|\.constdata\$(\d+)\|\|/.L_CONST$1/;       # ||.constdata$3||
     s/\|\|\.bss\$(\d+)\|\|/.L_BSS$1/;               # ||.bss$2||
@@ -263,9 +269,13 @@ while (<>) {
 } continue {
     printf ("%s", $_) if $printit;
     if ($addPadding != 0)
     {
         printf ("   mov r0,r0\n");
         $addPadding = 0;
     }
 }
-
+#If we had a code section, mark that this object doesn't need an executable
+# stack.
+if ($nxstack) {
+    printf ("    .section\t.note.GNU-stack,\"\",\%\%progbits\n");
+}