Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Content-Type: text/plain; charset="iso-8859-1" From: Felix Buenemann Reply-To: Felix DOT Buenemann AT gmx DOT de To: cygwin AT cygwin DOT com Subject: Porting problems with assembler Date: Tue, 7 Aug 2001 22:23:02 +0200 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01080722230209.00874@astral> Content-Transfer-Encoding: 8bit X-Sender: 520036473196-0001 AT t-dialin DOT net 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/