This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: underscore - coff vs. aout


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
especially.  Thanks.

   Cheers, 
   Jake


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.
> 
> 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.

-- 
   janovetz@uiuc.edu    | 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 crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]