[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiling third-party kernel modules for amd64 kernel onDebian/386



On 2005-07-22, Xavier Bestel wrote...
> Ok, I finally found a solution: I rebuilt the script/mod/modpost
> executable and copied it over the one in the kernel-build directory,
> and the installation went perfectly.
>
> Thanks,
>         Xav
http://lists.debian.org/debian-amd64/2005/07/msg00951.html

I also tried rebuilding script/mod/modpost, but it didn't solve my
problem. How did you rebuild it, and did you have to do modify
anything? I tried...
$ gcc modpost.c file2alias.c sumversion.c -o modpost

I did some debugging in modpost, and found in my case that in
parse_elf, hdr->e_shnum was always zero, which is clearly not correct
or good. readelf says, correctly, that...
  Number of section headers:         20

Cheers,
Shaun

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



Reply to: