macho and underscores on global function names

Mark Charney markcharney at gmail.com
Fri Mar 16 21:14:31 PDT 2007


(resend, dropped the list accidentally).

A win64/win32 test is not sufficient. One needs to know what compiler is
being used:  When using gcc-cygwin on windows, one wants the underscore.
When using MS cl/ml on win32/win64 the underscore is *not* desired.  Since
the c-compiler matters, there is no way to do it purely in yasm without
outside knowledge.

Anyway, you got me going on the right path. Thanks.
...Mark



> > no reason you cant have:
> >%ifidfn __OUTPUT_FORMAT__,macho
> >% define NAME(x) _ %+ x
> >%elifidfn __OUTPUT_FORMAT__,win64
> >% define NAME(x) _ %+ x
> >....
> >%else
> >% define NAME(x) x
> >%endif
>
>


-- 
Mark Charney      markcharney at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cvs.tortall.net/pipermail/yasm-devel/attachments/20070317/5450a0a8/attachment.html 


More information about the yasm-devel mailing list