[x264-devel] [PATCH] x264 executable stack and selinux

Dominik 'Rathann' Mierzejewski dominik at greysector.net
Sun Sep 30 23:23:01 CEST 2007


Hello.
One of the users reported a problem with SELinux:
http://bugzilla.livna.org/show_bug.cgi?id=1659

Starting totem on i386 gives:
(totem:670): GStreamer-WARNING **: Failed to load plugin
'/usr/lib/gstreamer-0.10/libgstx264.so': libx264.so.56: cannot enable executable
stack as shared object requires: Permission denied

This is caused by a difference in yasm and nasm syntax [...]

Patch attached.

Regards,
R.

-- 
Fedora contributor http://fedoraproject.org/wiki/DominikMierzejewski
Livna contributor http://rpm.livna.org MPlayer developer http://mplayerhq.hu
"Faith manages."
        -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
-------------- next part --------------
diff -up x264-20070819/common/amd64/amd64inc.asm.execstack x264-20070819/common/amd64/amd64inc.asm
--- x264-20070819/common/amd64/amd64inc.asm.execstack	2007-08-19 16:30:08.000000000 +0200
+++ x264-20070819/common/amd64/amd64inc.asm	2007-09-30 20:03:55.000000000 +0200
@@ -289,6 +289,10 @@ SECTION .text
 
 ; This is needed for ELF, otherwise the GNU linker assumes the stack is
 ; executable by default.
-%ifidn __YASM_OBJFMT__,elf
+%ifidn __OUTPUT_FORMAT__,elf
+%ifdef __NASM_MAJOR__
+section .note.GNU-stack noalloc noexec nowrite progbits
+%else
 section ".note.GNU-stack" noalloc noexec nowrite progbits
 %endif
+%endif
diff -up x264-20070819/common/i386/i386inc.asm.execstack x264-20070819/common/i386/i386inc.asm
--- x264-20070819/common/i386/i386inc.asm.execstack	2007-08-19 16:30:06.000000000 +0200
+++ x264-20070819/common/i386/i386inc.asm	2007-09-30 19:59:31.000000000 +0200
@@ -140,6 +140,10 @@ BITS 32
 ; This is needed for ELF, otherwise the GNU linker assumes the stack is
 ; executable by default.
 %ifidn __OUTPUT_FORMAT__,elf
+%ifdef __NASM_MAJOR__
+SECTION .note.GNU-stack noalloc noexec nowrite progbits
+%else
 SECTION ".note.GNU-stack" noalloc noexec nowrite progbits
 %endif
+%endif
 


More information about the x264-devel mailing list