[FFmpeg-devel] Mach-O section alignment

Måns Rullgård mans
Thu Jan 29 21:49:45 CET 2009

David DeHaven wrote:
> In libavcodec/x86/x86inc.asm:
> ; Name of the .rodata section.
> ; Kludge: Something on OS X fails to align .rodata even given an align
> attribute,
> ; so use a different read-only section.
>      %ifidn __OUTPUT_FORMAT__,macho64
>          SECTION .text align=16
>      %elifidn __OUTPUT_FORMAT__,macho
>          SECTION .text align=16
>          fakegot:
>      %else
>          SECTION .rodata align=16
>      %endif
> %endmacro
> 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.
> Thoughts?

Leave the hack until the a version with the fix is released.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list