[FFmpeg-devel] Mach-O section alignment

David DeHaven dave
Thu Jan 29 19:55:30 CET 2009

In libavcodec/x86/x86inc.asm:
; Name of the .rodata section.
; Kludge: Something on OS X fails to align .rodata even given an align  
; so use a different read-only section.
     %ifidn __OUTPUT_FORMAT__,macho64
         SECTION .text align=16
     %elifidn __OUTPUT_FORMAT__,macho
         SECTION .text align=16
         SECTION .rodata align=16

I sent a patch to both nasm and yasm that fixed section alignment.  
They both have incorporated the fix and now work properly.
I'm not quite sure how to approach a fix for this since it's dependent  
on non released versions of both.

minimum yasm version that contains the fix is svn r2161, no public  
release yet except in the SVN snapshots posted on the website:
$ yasm --version
yasm 0.7.99.HEAD
Compiled on Dec  7 2008.
Copyright (c) 2001-2008 Peter Johnson and other Yasm developers.
Run yasm --license for licensing overview and summary.

Unfortunately we can't check SVN revision as it simply reports HEAD.

Version 2.06rc2 of nasm posted on www.nasm.us contains the fix, which  
is easy enough to check.



More information about the ffmpeg-devel mailing list