[XviD-devel] Mach-O and SECTON .rotext

Takashi Mochizuki mochi at da2.so-net.ne.jp
Fri Dec 5 01:52:14 CET 2008


Hi, Micael-san,

On 2008/12/05, at 4:45, Michael Militzer wrote:

> I have reworked the x86 asm to make it compatible with yasm and have  
> readded
> yasm support to the CVS HEAD code. Further I have macro'ed the  
> 'SECTION
> .rotext' so it can be controlled from a central place (see macro  
> TEXT in
> nasm.inc).

I have tried new daily snapshot, and with some patches, asm code runs  
well.
- Both nasm 2.5.1 and yasm 0.7.2.2153 work well.

Would you please apply a-bit codes for MacOSX specific issue?

//

1) It still requires section name as ".text", not ".rotext"

Requires rename section for Mach-O binary; ifdef macro would be better  
though
vi ../../src/nasm.inc

%macro TEXT 0
-      SECTION .rotext align=SECTION_ALIGN
+      SECTION .text align=SECTION_ALIGN
%endmacro

2) MacOSX-i386 specific alignment patch

Requires alignment to avoid segfault (http://trac.handbrake.fr/changeset/1315 
)
vi ../../src/dct/x86_asm/fdct_sse2_skal.asm

ENDFUNC

+ALIGN SECTION_ALIGN
+  times 8 dw 0
+
%ifidn __OUTPUT_FORMAT__,elf
section ".note.GNU-stack" noalloc noexec nowrite progbits
%endif

3) MacOSX-PPC specific patch

Apple GCC still requires -arch ppc for cross compile(=universal binary)
(http://forum.doom9.org/showthread.php?t=142556)

modify 3 line as "-faltivec" with " -arch ppc -faltivec".

//

Regards,
Takashi Mochizuki



More information about the Xvid-devel mailing list