FIXME:
authorSam Lantinga <slouken@libsdl.org>
Tue, 21 Feb 2006 22:12:55 +0000
changeset 141340edc79b0926
parent 1412 a8181c4040b8
child 1414 4fe98eace733
FIXME:
This code needs to be rewritten to reference the static data using relocatable addresses (e.g. http://www.gentoo.org/proj/en/hardened/pic-fix-guide.xml or http://nasm.sourceforge.net/doc/html/nasmdoc8.html#section-8.2)
This code currently breaks on systems with readonly text segments (hardened Linux / Intel Mac)
src/video/SDL_yuv_mmx.c
src/video/SDL_yuv_sw.c
     1.1 --- a/src/video/SDL_yuv_mmx.c	Tue Feb 21 21:45:31 2006 +0000
     1.2 +++ b/src/video/SDL_yuv_mmx.c	Tue Feb 21 22:12:55 2006 +0000
     1.3 @@ -21,6 +21,7 @@
     1.4  */
     1.5  #include "SDL_config.h"
     1.6  
     1.7 +#if 0 /* FIXME: This code needs to be rewritten to reference the static data using relocatable addresses (e.g. http://www.gentoo.org/proj/en/hardened/pic-fix-guide.xml or http://nasm.sourceforge.net/doc/html/nasmdoc8.html#section-8.2) This code currently breaks on systems with readonly text segments (hardened Linux / Intel Mac) */
     1.8  #if defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
     1.9  
    1.10  #include "SDL_stdinc.h"
    1.11 @@ -406,3 +407,4 @@
    1.12  }
    1.13  
    1.14  #endif /* GCC i386 inline assembly */
    1.15 +#endif /* 0 */
     2.1 --- a/src/video/SDL_yuv_sw.c	Tue Feb 21 21:45:31 2006 +0000
     2.2 +++ b/src/video/SDL_yuv_sw.c	Tue Feb 21 22:12:55 2006 +0000
     2.3 @@ -121,6 +121,7 @@
     2.4  
     2.5  /* The colorspace conversion functions */
     2.6  
     2.7 +#if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
     2.8  extern void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix,
     2.9                                       unsigned char *lum, unsigned char *cr,
    2.10                                       unsigned char *cb, unsigned char *out,
    2.11 @@ -129,6 +130,7 @@
    2.12                                       unsigned char *lum, unsigned char *cr,
    2.13                                       unsigned char *cb, unsigned char *out,
    2.14                                       int rows, int cols, int mod );
    2.15 +#endif 
    2.16  
    2.17  static void Color16DitherYV12Mod1X( int *colortab, Uint32 *rgb_2_pix,
    2.18                                      unsigned char *lum, unsigned char *cr,
    2.19 @@ -1059,7 +1061,7 @@
    2.20  	    case SDL_YV12_OVERLAY:
    2.21  	    case SDL_IYUV_OVERLAY:
    2.22  		if ( display->format->BytesPerPixel == 2 ) {
    2.23 -#if defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
    2.24 +#if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
    2.25  			/* inline assembly functions */
    2.26  			if ( SDL_HasMMX() && (Rmask == 0xF800) &&
    2.27  			                     (Gmask == 0x07E0) &&
    2.28 @@ -1081,7 +1083,7 @@
    2.29  			swdata->Display2X = Color24DitherYV12Mod2X;
    2.30  		}
    2.31  		if ( display->format->BytesPerPixel == 4 ) {
    2.32 -#if defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
    2.33 +#if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
    2.34  			/* inline assembly functions */
    2.35  			if ( SDL_HasMMX() && (Rmask == 0x00FF0000) &&
    2.36  			                     (Gmask == 0x0000FF00) &&