This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Re: underscore - coff vs. aout
On Mon, Jul 12, 1999 at 01:44:04PM -0600, Jeffrey A Law wrote:
> In message <852567AC.0059EF97.00@notes4.nmss.com>you write:
> >
> >
> > 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?
> gcc-2.95 has support for building code with and without leading underscores
> on some targets which might help.
>
> Or you could always write a program which sucks in a .o/.a, renames all
> the symbols, then writes a new .o/.a. It's just a series of hacks to objcopy.
Doesn't objcopy support symbol renaming? You could just write a script
to call objcopy for each symbol. If it's just a one-time shot, no big
deal.
Cheers,
Jake
--
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.