FLAT objects cannot have multiple sections, so using the L1 attributes breaks
authorMike Frysinger <vapier.adi@gmail.com>
Sat, 16 Feb 2008 15:17:59 +0000 (15:17 +0000)
committerDiego Biurrun <diego@biurrun.de>
Sat, 16 Feb 2008 15:17:59 +0000 (15:17 +0000)
linking. The FDPIC relocs also break for any other format. Thus check the
compiler environment and select the appropriate sections/relocs.
patch by Mike Frysinger, vapier.adi a gmail d com

Originally committed as revision 26010 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/internal_bfin.S
libswscale/swscale_bfin.c
libswscale/yuv2rgb_bfin.c

index 475d704529c313a97305878d70d0e02da0714734..2d5c61a14acd7fc07f3fbf6a6cb75cae8c57a8e0 100644 (file)
 
 */
 
-#define mL1 .l1.text
 #define mL3 .text
+#ifdef __FDPIC__
+#define mL1 .l1.text
+#else
+#define mL1 mL3
+#endif
 #define MEM mL1
 
 #define DEFUN(fname,where,interface) \
index 763a005d90eb048d5b08d1e3273fd4eb77dcaf0f..bbc304dfe35616878405d40dfceabf6c8d1e8022 100644 (file)
 #include "swscale.h"
 #include "swscale_internal.h"
 
+#ifdef __FDPIC__
+#define L1CODE __attribute__ ((l1_text))
+#else
+#define L1CODE
+#endif
 
 extern int ff_bfin_uyvytoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
                                long width, long height,
-                               long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text));
+                               long lumStride, long chromStride, long srcStride) L1CODE;
 
 extern int ff_bfin_yuyvtoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
                                long width, long height,
-                               long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text));
+                               long lumStride, long chromStride, long srcStride) L1CODE;
 
 static int uyvytoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
                                 int srcSliceH, uint8_t* dst[], int dstStride[])
index e35d49efbdcf5bb5daf5224a79c4af056d0f7b0e..d2770793bcd7485458b7bf4c10e9e369950a30a1 100644 (file)
 #include "swscale.h"
 #include "swscale_internal.h"
 
-
+#ifdef __FDPIC__
 #define L1CODE __attribute__ ((l1_text))
+#else
+#define L1CODE
+#endif
 
 extern void ff_bfin_yuv2rgb555_line (uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out,
                                      int w, uint32_t *coeffs) L1CODE;