media/libtheora/bug752139-r18031.patch

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 diff --git a/media/libtheora/lib/arm/arm2gnu.pl b/media/libtheora/lib/arm/arm2gnu.pl
     2 --- a/media/libtheora/lib/arm/arm2gnu.pl
     3 +++ b/media/libtheora/lib/arm/arm2gnu.pl
     4 @@ -1,11 +1,14 @@
     5  #!/usr/bin/perl
     7  my $bigend;  # little/big endian
     8 +my $nxstack;
     9 +
    10 +$nxstack = 0;
    12  eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
    13      if $running_under_some_shell;
    15  while ($ARGV[0] =~ /^-/) {
    16      $_ = shift;
    17    last if /^--/;
    18      if (/^-n/) {
    19 @@ -77,16 +80,19 @@ while (<>) {
    20      if ( /\bMEND\b/ ) {
    21        s/\bMEND\b/.endm/;
    22        $n=0;
    23      }
    25      # ".rdata" doesn't work in 'as' version 2.13.2, as it is ".rodata" there.
    26      #
    27      if ( /\bAREA\b/ ) {
    28 +        if ( /CODE/ ) {
    29 +            $nxstack = 1;
    30 +        }
    31          s/^(.+)CODE(.+)READONLY(.*)/    .text/;
    32          s/^(.+)DATA(.+)READONLY(.*)/    .section .rdata\n    .align 2/;
    33          s/^(.+)\|\|\.data\|\|(.+)/    .data\n    .align 2/;
    34          s/^(.+)\|\|\.bss\|\|(.+)/    .bss/;
    35      }
    37      s/\|\|\.constdata\$(\d+)\|\|/.L_CONST$1/;       # ||.constdata$3||
    38      s/\|\|\.bss\$(\d+)\|\|/.L_BSS$1/;               # ||.bss$2||
    39 @@ -263,9 +269,13 @@ while (<>) {
    40  } continue {
    41      printf ("%s", $_) if $printit;
    42      if ($addPadding != 0)
    43      {
    44          printf ("   mov r0,r0\n");
    45          $addPadding = 0;
    46      }
    47  }
    48 -
    49 +#If we had a code section, mark that this object doesn't need an executable
    50 +# stack.
    51 +if ($nxstack) {
    52 +    printf ("    .section\t.note.GNU-stack,\"\",\%\%progbits\n");
    53 +}

mercurial