delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/05/21:03:13

From: jhorner AT cs DOT utk DOT edu (Jeffrey Russell Horner)
Subject: Re: B19: Removing @N's added to symbol names
5 Oct 1998 21:03:13 -0700 :
Message-ID: <199810051354.JAA22946.cygnus.gnu-win32@nala.cs.utk.edu>
References: <3617EB84 DOT F1CB69FA AT tpu DOT org>
To: Adam Chlipala <psion AT tpu DOT org>
Cc: gnu-win32 AT cygnus DOT com

Adam,

I don't know what version of Cygwin32 gcc you're using, but neither
the binary release (beta 19) nor Mumit Khan's egcs 1.1 for beta 19 behave
this way. They default to producing symbols with an underscore at the beginning,
which is the cdecl calling convention behavior.

Both fastcall and stdcall calling conventions append @<somenumber> to the end of their symbols, and fastcall prepends an @ symbol. the <somenumber> is actually
the number of bytes of the argument list.

To fix your problem, place this in all your source files that define or use
func():

void func( int arg1, int arg2, ... ) __attribute__ ((cdecl));

Make sure you use the exact argument list that you want; I just used examples
above.

>Is there any way that I can get gcc to not add @<somenumber> to the end
>of symbol names?  A DLL that I am using functions from does not have
>this addition but CygWin32 gcc insists on adding it.  Do I have to make
>an object file converter or what?
>
>-- Adam Chlipala
>   psion AT tpu DOT org
>   http://www.tpu.org/~psion/
>   ICQ UIN: 489166
>
>
>  -----BEGIN GEEK CODE BLOCK-----
>  Version: 3.1
>  GCS/L/P/SS d- s:- a--- C++$ UL+ UA+$ UB$ P++ W+++ N+ w+ M- V? PS+++
>PE++ Y+ t++
>  5 X+++ R+++>$ tv b++(+++) DI++ D- G e- h! !r y
>  ------END GEEK CODE BLOCK------
>
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

****************************************************************
Jeff Horner        The University of Tennessee     CS Department
423 974-2841            fax: 423 974-8296         104 Ayres Hall
http://www.cs.utk.edu/~jhorner/        Knoxville, TN  37996-1301              
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019