Re: [Linux-ia64] Offsets from C struct into assembler

From: Christian Hildner <christian.hildner_at_hob.de>
Date: 2002-01-29 18:06:46
David Mosberger schrieb:

> >>>>> On Tue, 29 Jan 2002 07:59:43 +1100, Keith Owens <kaos@ocs.com.au> said:
>
>   Keith> On Mon, 28 Jan 2002 08:11:23 -0700, n0ano@indstorage.com
>   Keith> wrote:
>   >> Or you can check out how the IA64 Linux kernel does this.  The
>   >> file `arch/ia64/tools/printoffsets.c' is a program that is
>   >> compiled and, when run, generates the file `include
>   >> asm-ia64/offsets.h' which is an ASM include file containing
>   >> structure offsets.
>
>   Keith> That tool is disappearing in 2.5 kernels.  All architectures
>   Keith> will use the same method for generating asm offsets, the one
>   Keith> I included in my previous mail.
>
> As of v2.5.3-pre5 I don't see any sign of your new kernel build
> environment being part of Linus' tree.  Perhaps it will be accepted
> some day, but until that happens, the scheme described by Don is the
> correct one.
>
>         --david

Although it would be a nice feature of the gcc if it could include C headers
combined with an assembler directive for using the offsets the simple solution
with print_offsets does it's job fine. The good thing here is that awk isn't
needed.

Thanks,

Christian
Received on Mon Jan 28 23:14:23 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:07 EST