[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  
> .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  
- Both nasm 2.5.1 and yasm 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  
vi ../../src/nasm.inc

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

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


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

3) MacOSX-PPC specific patch

Apple GCC still requires -arch ppc for cross compile(=universal binary)

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


Takashi Mochizuki

More information about the Xvid-devel mailing list