Re: Mach-O and SECTION .rodata

David DeHaven <[email protected]>
Newsgroups gmane.comp.video.xvid.devel
Message-ID <[email protected]>
>>> After a few hour search, I have found
>>> - <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-August/015984.html
>>>>
>>>
>>> Directive ALIGN for SECTION .rodata may not function well - under
>>> "some" MacOS X; at least my mac.
>>> (It seems to be, not yasm/nasm issue though... by ld64?)
>>
>> I'm going to go out on a limb here and say ld64 is doing exactly what
>> it's supposed to do and the bug is in the mach-o object code in nasm/
>> yasm.
>
> Seems I was right. In yasm/modules/objfmts/macho/macho-objfmt.c if I
> force address alignment in macho_objfmt_calc_sectsize then it builds
> and runs just fine using .rodata instead of .text.
>
> Running xvid_bench right now and it hasn't crashed yet...

Patch was submitted to yasm-devel and is now in yasm SVN HEAD (as of  
r2161). I built xvid_bench with it and it ran just fine.

-DrD-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.