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


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

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