This is the mail archive of the
mailing list for the crossgcc project.
Re: underscore - coff vs. aout
- To: firstname.lastname@example.org
- Subject: Re: underscore - coff vs. aout
- From: email@example.com (David Querbach)
- Date: Mon, 12 Jul 1999 14:09:44 -0700 (PDT)
- Reply-To: firstname.lastname@example.org
> I have a number of assembly files with symbols written with a underscore
> prepended so that they will link with .c files compiled for a.out format.
> I was thinking of changing to coff format, and I would like to know if
> there was a way to compile the .c files for coff so that they would still
> link correctly to the assembly files (that is, with prepended underscores).
> Changing every symbol would be a large undertaking, and I would like to
> avoid it if possible.
> Any suggestions?
Open up gcc.info and search for `underscore'. You will find one section
showing how to give a C function an arbitrary name in the assembler code:
extern void foo() asm("foobar");
creates a function which in the compiler's assembler output is called
`foobar', no matter what the particular compiler port's convention for
name-mangling happens to be.
Real-Time Systems Inc.
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
To remove yourself from the crossgcc list, send
mail to email@example.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.