Building a 64-bit module on i386

From: Shaun Jackman (sjackman_at_gmail.com)
Date: 09/30/05

  • Next message: Linus Torvalds: "Re: [howto] Kernel hacker's guide to git, updated"
    Date:	Fri, 30 Sep 2005 12:11:14 -0600
    To: debian-amd64@lists.debian.org, lkml <linux-kernel@vger.kernel.org>
    
    

    Hello,

    I'm running the Debian i386 architecture on a amd64-k8 running an
    amd64-k8 Linux kernel. I'm trying to compile a module (fuse
    inicdentally) for my 64-bit kernel. I'm compiling the module using
    ARCH=x86_64 CC='gcc-3.4 -m64'. This method compiles all the object
    files, but modpost fails:
      Building modules, stage 2.
      scripts/mod/modpost -i
    /usr/src/kernel-headers-2.6.11-9-amd64-k8/Module.symvers
    /home/sjackman/src/modules/usr_src/modules/fuse/kernel/fuse.o
    modpost: /home/sjackman/src/modules/usr_src/modules/fuse/kernel/fuse.o
    no symtab?

    Some debugging of modpost shows that in parse_elf, hdr->e_shnum is 0,
    whereas readelf says that it is 20. Any suggestions?

    Please cc me in your reply. Cheers,
    Shaun

    $ uname -a
    Linux jinx.pathway.internal 2.6.11-9-amd64-k8 #1 Mon Jun 27 22:07:27
    MDT 2005 x86_64 GNU/Linux
    $ readelf -h fuse.o
    ELF Header:
      Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
      Class: ELF64
      Data: 2's complement, little endian
      Version: 1 (current)
      OS/ABI: UNIX - System V
      ABI Version: 0
      Type: REL (Relocatable file)
      Machine: Advanced Micro Devices X86-64
      Version: 0x1
      Entry point address: 0x0
      Start of program headers: 0 (bytes into file)
      Start of section headers: 23432 (bytes into file)
      Flags: 0x0
      Size of this header: 64 (bytes)
      Size of program headers: 0 (bytes)
      Number of program headers: 0
      Size of section headers: 64 (bytes)
      Number of section headers: 20
      Section header string table index: 17
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Linus Torvalds: "Re: [howto] Kernel hacker's guide to git, updated"

    Relevant Pages

    • Re: Fedora core 3 Version magic error..
      ... > After building the rpm file from the available sources on the Linux kernel 2.6.10 which was D/W from kernel.org and build, I am unable to load it. ... Looks like you did not compile the tifm module with latest compiler. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Linux Kernel Source--Unquestionably Undefined Behavior
      ... According to the C Standard: ... The behavior is well defined in the implemention used to compile ... The Linux Kernel Source, as a result, commits undefined behavior. ...
      (comp.lang.c)
    • Kernel compilation error
      ... Today I was trying to compile the Linux kernel 2.6.12 after applying ... include/linux/key.h:234: internal compiler error: Segmentation fault ... Please submit a full bug report, ...
      (comp.os.linux.development.system)
    • Re: kernel module
      ... > First of all I would apologize in case this the wrong group for ... > posting this article. ... > I'm trying to write small Linux kernel modules.I compile them with the ... That's not how you compile a kernel module, ...
      (comp.os.linux.development.system)
    • Re: [SLE] My first kernel compile
      ... > Hey guys' ... > I finally tried to compile the linux kernel from src for my first ...
      (SuSE)