Subject: Re: ELF
To: Bill Studenmund <wrstuden@zembu.com>
From: Frederick Bruckman <fredb@immanent.net>
List: port-mac68k
Date: 07/16/2001 19:38:19
On Mon, 16 Jul 2001, Bill Studenmund wrote:

> On Mon, 16 Jul 2001, Frederick Bruckman wrote:
>
> > The compiler doesn't like the bit in mrg_aline_super() about being
> > told to preserve "a6". I wonder how it can -- maybe that's just a
> > no-op with the old compiler.
>
> Not sure about this.

Let me re-phrase that. I wonder how it can _not_ preserve "a6". All
that last line in the asm() special function does, is to tell the
compiler not to use the listed registers for scratch. That's why
telling it to preserve the frame pointer is now prohibited, to let the
user know not to mess with that (I guess). Nothing in macrom.c messes
with "a6", and whether the trap does or not is immaterial, as gcc is
not going to mess with it within the function, not ever.

> > Finally, there's the business of ELF adding underscores to symbol
> > names, causing many of the assembly defined entry points to give
> > "undefined symbol" at linktime (even without the ldscript). How are
> > you supposed to deal with that?
>
> I think it's actually ELF _not_ adding underscores. :-)
>
> Usually what we do is, for routines processed by CPP, use the
> _C_LABEL() macro (in machine/asm.h). It makes a label which can be
> called by C routines. On a.out systems, it prepends an underscore. On ELF
> it doesn't.

Thanks! I knew it was something like that.


Frederick