Re: exporting struct offsets to assembler

From: Brian Gerst (bgerst@didntduck.org)
Date: Sat Aug 05 2000 - 09:55:34 EDT

  • Next message: Rusty Russell: "Re: [PATCH] lock troubles in pre6-2"

    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.

    These symbols are getting in there anyways. "nm vmlinux" shows:

    00000000 a EBX
    00000000 a state
    00000001 a CF_MASK
    00000004 a ECX
    00000004 a flags
    00000008 a EDX
    00000008 a sigpending
    0000000c a ESI
    0000000c a addr_limit
    0000000c a addr_limit
    0000000c a addr_limit
    00000010 a EDI
    00000010 a exec_domain
    00000014 a EBP
    00000014 a need_resched
    00000018 a EAX
    00000018 a tsk_ptrace
    0000001c a DS
    00000020 a ES
    00000024 a ORIG_EAX
    00000026 a ENOSYS
    00000028 a EIP
    0000002c a CS
    00000030 a EFLAGS
    00000034 a OLDESP
    00000034 a processor
    00000038 a OLDSS
    00000200 a IF_MASK
    00004000 a NT_MASK
    00020000 a VM_MASK

    most of these are from entry.S. They are grepped out when we create
    System.map.

    > >
    > > This _should_ be arch-independent, but there is one potential
    >
    > What's the point ? The assembly isn't architecture-independent anyway.

    The point is that we let gcc/ld take care of these offsets by itself
    instead of hacking up an external program (which complicates
    cross-compiling) to extract them.

    -- 
    

    Brian Gerst

    - 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:03:29 EDT