media/libtheora/bug752139-r18031.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libtheora/bug752139-r18031.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,53 @@
     1.4 +diff --git a/media/libtheora/lib/arm/arm2gnu.pl b/media/libtheora/lib/arm/arm2gnu.pl
     1.5 +--- a/media/libtheora/lib/arm/arm2gnu.pl
     1.6 ++++ b/media/libtheora/lib/arm/arm2gnu.pl
     1.7 +@@ -1,11 +1,14 @@
     1.8 + #!/usr/bin/perl
     1.9 + 
    1.10 + my $bigend;  # little/big endian
    1.11 ++my $nxstack;
    1.12 ++
    1.13 ++$nxstack = 0;
    1.14 + 
    1.15 + eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
    1.16 +     if $running_under_some_shell;
    1.17 + 
    1.18 + while ($ARGV[0] =~ /^-/) {
    1.19 +     $_ = shift;
    1.20 +   last if /^--/;
    1.21 +     if (/^-n/) {
    1.22 +@@ -77,16 +80,19 @@ while (<>) {
    1.23 +     if ( /\bMEND\b/ ) {
    1.24 +       s/\bMEND\b/.endm/;
    1.25 +       $n=0;
    1.26 +     }
    1.27 + 
    1.28 +     # ".rdata" doesn't work in 'as' version 2.13.2, as it is ".rodata" there.
    1.29 +     #
    1.30 +     if ( /\bAREA\b/ ) {
    1.31 ++        if ( /CODE/ ) {
    1.32 ++            $nxstack = 1;
    1.33 ++        }
    1.34 +         s/^(.+)CODE(.+)READONLY(.*)/    .text/;
    1.35 +         s/^(.+)DATA(.+)READONLY(.*)/    .section .rdata\n    .align 2/;
    1.36 +         s/^(.+)\|\|\.data\|\|(.+)/    .data\n    .align 2/;
    1.37 +         s/^(.+)\|\|\.bss\|\|(.+)/    .bss/;
    1.38 +     }
    1.39 + 
    1.40 +     s/\|\|\.constdata\$(\d+)\|\|/.L_CONST$1/;       # ||.constdata$3||
    1.41 +     s/\|\|\.bss\$(\d+)\|\|/.L_BSS$1/;               # ||.bss$2||
    1.42 +@@ -263,9 +269,13 @@ while (<>) {
    1.43 + } continue {
    1.44 +     printf ("%s", $_) if $printit;
    1.45 +     if ($addPadding != 0)
    1.46 +     {
    1.47 +         printf ("   mov r0,r0\n");
    1.48 +         $addPadding = 0;
    1.49 +     }
    1.50 + }
    1.51 +-
    1.52 ++#If we had a code section, mark that this object doesn't need an executable
    1.53 ++# stack.
    1.54 ++if ($nxstack) {
    1.55 ++    printf ("    .section\t.note.GNU-stack,\"\",\%\%progbits\n");
    1.56 ++}

mercurial