[cc65] Re: Undersores required for all asm calls?

From: Aaron J. Grier <agrier1poofygoof.com>
Date: 2010-04-28 23:14:02
On Wed, Apr 28, 2010 at 10:24:37PM +0200, Ullrich von Bassewitz wrote:
> Prepending an underscore has been a common behaviour, even for very
> old C compilers. There are other ways to mangle the names (appending a
> $ or similar), but I don't know a single C compiler that doesn't
> change the identifiers when generating assembly. Which makes sense for
> the reasons explained by Oliver.

underscore prepending is optional for some gcc targets, and seems to
vary depending on binary format.  m68k-aout uses them, -coff and -elf do
not.  most of the time they can be controlled with -fleading-underscore
/ -fno-leading-underscore.  if your assembly uses the C ABI for your
target, there's no need to do name mangling.

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier@poofygoof.com
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Apr 28 23:14:20 2010

This archive was generated by hypermail 2.1.8 : 2010-04-28 23:14:22 CEST