[FFmpeg-devel] TEXTRELs in fft_mmx.asm (was Re: [PATCH] split-radix FFT)
Mon Nov 3 05:44:18 CET 2008
On Sat, 1 Nov 2008, Dominik 'Rathann' Mierzejewski wrote:
> ... these 6 macros seem to be causing textrels even on x86_64.
> I've already given up on avoiding textrels in FFmpeg on x86_32,
> but on x86_64 this is the only problematic case.
First blacklist everything Drepper has ever written, and explain in your
own words why you want to avoid textrels. If it's just to stop selinux
from complaining at you, then screw it, I'm not willing to spend any code
The only reason I support PIC on x86_64 is that ld.so doesn't support
32bit textrels in 64bit shared libs. That ld.so bug does not extend to
prevent 64bit textrels, so I see no reason to avoid them.
Then, does this work? According to readelf, .rodata is loaded into the
main RX section. I could use .rel.data.ro, but that needs an ifdef for
non-elf. I could use .data, but that's counterproductive if your reason
for disliking textrels involves the duplication of memory pages. Both
.data and .rel.data.ro nead an extra empty section declaration to avoid
yasm's "libavcodec/i386/fft_mmx.asm:463: warning: section flags ignored
on section redeclaration", which would be counterproductive if your
reason for disliking textrels involves avoiding warnings.
-------------- next part --------------
diff --git a/libavcodec/i386/fft_mmx.asm b/libavcodec/i386/fft_mmx.asm
index c0a9bd5..00ac9dd 100644
@@ -446,8 +446,9 @@ fft %+ n %+ %3%2:
dispatch_tab%3%2: pointer list_of_fft
; On x86_32, this function does the register saving and restoring for all of fft.
; The others pass args in registers and don't spill anything.
More information about the ffmpeg-devel