File: 01_fix-i386-exec-stack.patch

package info (click to toggle)
pcsxr 1.9.94-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,880 kB
  • sloc: ansic: 117,284; objc: 8,159; cpp: 1,140; makefile: 315; asm: 145; pascal: 30; sh: 20
file content (28 lines) | stat: -rw-r--r-- 842 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Fix executable stack on i386
 Fix is needed only for nasm >= 2.09, not tested on older versions.
Author: Andrey Rahmatullin <wrar@wrar.name>
Bug: http://pcsxr.codeplex.com/workitem/7915
Last-Update: 2011-01-15

--- a/plugins/dfxvideo/Makefile.am
+++ b/plugins/dfxvideo/Makefile.am
@@ -4,7 +4,7 @@ SUFFIXES = .asm
 
 .asm.lo:
 	$(LIBTOOL) --tag=CC --mode=compile \
-	$(STRIP_FPIC) $(NASM) -f elf -d ELF -I${srcdir}/ $<
+	$(STRIP_FPIC) $(NASM) -f elf32 -d ELF -I${srcdir}/ $<
 
 AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \
 	-DDATADIR=\"${datadir}/psemu/\" \
--- a/plugins/dfxvideo/i386.asm
+++ b/plugins/dfxvideo/i386.asm
@@ -61,7 +61,7 @@ NEWSYM i386_shl10idiv
 	mov esp, ebp
 	pop ebp
 	ret
-%ifidn __OUTPUT_FORMAT__,elf
+%ifidn __OUTPUT_FORMAT__,elf32
 section .note.GNU-stack noalloc noexec nowrite progbits
 %endif