underscore - coff vs. aout
Mon Jul 12 17:30:00 GMT 1999
Man, that gcc.info stuff would be so useful if I knew how
to use it. The whole GNU thing has been moving towards
info, but I'm left behind as a lonesome 'vi' guy.
This is a good thing to know, though, for embedded systems work
On Mon, Jul 12, 1999 at 02:09:44PM -0700, David Querbach wrote:
> > 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.
> David Querbach
> Real-Time Systems Inc.
> New CrossGCC FAQ: http://www.objsw.com/CrossGCC
> To remove yourself from the crossgcc list, send
> mail to firstname.lastname@example.org with the
> text 'unsubscribe' (without the quotes) in the
> body of the message.
email@example.com | Once you have flown, you will walk the earth with
University of Illinois | your eyes turned skyward, for there you have been,
| there you long to return. -- da Vinci
PP-ASEL | http://www.ews.uiuc.edu/~janovetz/index.html
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
To remove yourself from the crossgcc list, send
mail to firstname.lastname@example.org with the
text 'unsubscribe' (without the quotes) in the
body of the message.
More information about the crossgcc