This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Re: underscore - coff vs. aout
- To: crossgcc@cygnus.com
- Subject: Re: underscore - coff vs. aout
- From: querbach@realtime.bc.ca (David Querbach)
- Date: Mon, 12 Jul 1999 14:09:44 -0700 (PDT)
- Reply-To: crossgcc@cygnus.com
> 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");
void foo()
{
}
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.
Regards,
David Querbach
Real-Time Systems Inc.
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.