On Sat, Aug 05, 2000 at 05:21:51AM +0100, Philipp Rumpf wrote:
> On Sat, Aug 05, 2000 at 12:27:42PM +1000, Andrew Morton wrote:
> > It uses some compiler tricks to export the structure offset
> > into a global absolute symbol and uses that symbol in the
> > assembly code.
>
> So it introduces bogus symbols into System.map.
Well use symbols that assembler will normally throw away (on most ELF ports,
these symbols begin with .L, on most coff/a.out ports, these symbols begin with
just L).
> >
> > This _should_ be arch-independent, but there is one potential
>
> What's the point ? The assembly isn't architecture-independent anyway.
>
> > This can be avoided if the assembler is smart enough with
> >
> > move some_label:b(a0),d0
> >
> > but I don't know if gas does that.
>
> Or it can be avoided by using a header file that #defines the offsets -
> which is exactly what mips does and other architectures did until some
> time ago. See arch/mips/tools/offset.c.
>
> I think it would be a better idea to generate the offsets automatically
> and possibly in an architecture-independent way without falling back to
> using symbols.
However, you don't want to write a program that prints out the offsets, since
then you are prohibiting building Linux with a cross compiler.
-- Michael Meissner, Red Hat, Inc. PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA Work: meissner@redhat.com phone: +1 978-486-9304 Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Aug 05 2000 - 10:54:36 EDT