Mail Archives: cygwin/2001/08/07/16:28:42
Hi.
I'm currently trying to port a program that makes heavy use of assembler
(namely mplayer -> http://mplayerhq.hu), to win32 (and OpenBSD, where I have
the same prob).
The problem is that on Linux/ELF I use extern functionname() in C code and
functionname in external gas asm code, but if I try to link this on win32 (or
OpenBSD/aout) external asm functions need a preceding underscore to link
fine, so it must be extern functionname() in C and _functionname in assembler
source.
No one could write a preprocessor definition in the form of:
#if defined(__CYGWIN__) || defined(__OpenBSD__)
#define ASMLINK(x) x
#else
#define ASMLINK(x) _##x
#endif
and then replace all functionname in asm source with _functionname and all
functionname() in c source with ASMLINK(funtionname)(), but this is quite
messy and as mplayer has lot's of external libraries that need to be kept on
sync with external development this is a sort of no way.
So my question, are there any other ways to achieve this goal, best thing
would be some assembler/compiler/linker/whatever option to resolve it.
Thanks!
--
Best Regards,
Felix
____
Ever tried? Ever failed? - Try again! Fail better!
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -