[XviD-devel] Linked errors cross-compiling for x64 Windows on x64 Linux

Michael Militzer michael at xvid.org
Wed Feb 16 23:04:49 CET 2011


Hi,

you can prevent the leading underscores by adding "-DNO_PREFIX" to your
yasm/nasm command line.

Regards,
Michael


Quoting Leo Izen <leo.izen at gmail.com>:

> On Wed, Feb 16, 2011 at 8:03 AM, Michael Militzer <michael at xvid.org> wrote:
>
>> Hi,
>>
>> all your undefined references are symbols defined in assembler .asm files.
>> So I guess something did go wrong assembling these files (or the object
>> output is broken etc.).
>>
>
> Problem discovered: all the assembly symbols are prefixed by and underscore:
> i.e.
>
> [Leo at chessman =build]$ x86_64-w64-mingw32-nm
> quant/x86_asm/quantize_h263_mmx.o
> 0000000000000000 r .rodata
> 0000000000000000 t .rotext
> 0000000000000000 t .text
> 0000000000000840 T _dequant_h263_inter_mmx
> 000000000000087e t _dequant_h263_inter_mmx.loop
> 00000000000009c0 T _dequant_h263_inter_sse2
> 0000000000000a1d t _dequant_h263_inter_sse2.loop
> 0000000000000900 T _dequant_h263_inter_xmm
> 0000000000000940 t _dequant_h263_inter_xmm.loop
> 0000000000000580 T _dequant_h263_intra_mmx
> 00000000000005be t _dequant_h263_intra_mmx.loop
> 0000000000000720 T _dequant_h263_intra_sse2
> 0000000000000777 t _dequant_h263_intra_sse2.loop
> 0000000000000660 T _dequant_h263_intra_xmm
> 000000000000069c t _dequant_h263_intra_xmm.loop
> 00000000000002c0 T _quant_h263_inter_mmx
> 0000000000000356 t _quant_h263_inter_mmx.done
> 0000000000000300 t _quant_h263_inter_mmx.loop
> 0000000000000380 t _quant_h263_inter_mmx.q1loop
> 000000000000036b t _quant_h263_inter_mmx.q1routine
> 00000000000003e0 T _quant_h263_inter_sse2
> 00000000000004ac t _quant_h263_inter_sse2.qes2_done
> 0000000000000440 t _quant_h263_inter_sse2.qes2_loop
> 000000000000040f t _quant_h263_inter_sse2.qes2_not1
> 00000000000004dd t _quant_h263_inter_sse2.qes2_q1_routine
> 0000000000000500 t _quant_h263_inter_sse2.qes2_q1loop
> 0000000000000000 T _quant_h263_intra_mmx
> 0000000000000120 t _quant_h263_intra_mmx.end
> 000000000000004e t _quant_h263_intra_mmx.loop
> 00000000000000c1 t _quant_h263_intra_mmx.loop_low
> 00000000000000af t _quant_h263_intra_mmx.low
> 0000000000000140 T _quant_h263_intra_sse2
> 00000000000002a5 t _quant_h263_intra_sse2.end
> 000000000000019f t _quant_h263_intra_sse2.loop
> 000000000000022e t _quant_h263_intra_sse2.loop_low
> 000000000000021b t _quant_h263_intra_sse2.low
> 0000000000000220 r mmx_div
> 0000000000000020 r mmx_quant
> 0000000000000120 r mmx_sub
> 0000000000000000 r plus_one
> [Leo at chessman =build]$
>
>
>>
>> Which assembler do you use? yasm or nasm? Make sure you have the latest
>> (stable) version installed. If you already have the latest version, try
>> yasm instead of nasm (or vice-versa).
>>
>>
>  I am using yasm, from my package manager and the latest cvs of xvidcore.
> However, seeing that I figured out that there's underscores above, I think a
> better solution would be an addition to AFLAGS to not use an underscore. My
> current AFLAGS do use -f win64 and the needed stuff to assemble for
> x86_64-w64-mingw32, and from the nm above, the object files are valid.
>
> So...  is there an AFLAG that will let me remove the _prefix?
>
>
>> I have successfully cross-compiled xvidcore to win64 with both yasm and
>> nasm, but with older gcc (not 4.6). But it doesn't look like gcc is the
>> problem here...
>>
>> Regards,
>> Michael
>>
>>





More information about the Xvid-devel mailing list