This is the mail archive of the
mailing list for the Cygwin project.
Porting problems with assembler
- To: cygwin at cygwin dot com
- Subject: Porting problems with assembler
- From: Felix Buenemann <atmosfear at users dot sourceforge dot net>
- Date: Tue, 7 Aug 2001 22:23:02 +0200
- Reply-To: Felix dot Buenemann at gmx dot de
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
No one could write a preprocessor definition in the form of:
#if defined(__CYGWIN__) || defined(__OpenBSD__)
#define ASMLINK(x) x
#define ASMLINK(x) _##x
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.
Ever tried? Ever failed? - Try again! Fail better!
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html