[lkml]   [2003]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: modutils: using kallsyms when cross-compiling kernel
On 24 Jan 2003 16:51:42 -0800, 
Roland Dreier <> wrote:
>Looking further in the code it looks like none of ELF handling stuff
>takes endianness into account. For example, e_type is also
>byte-swapped from what kallsyms is looking for.
>Is my diagnosis correct? Is there any easy way for me to fix this (at
>least enough so that I can build a PPC kernel on x86 with kkallsyms
>support), or is the only solution to bite the bullet and fix the
>modutils ELF code to be endianness clean?

You are correct. modutils was never designed to run on one system and
handle modules created for another. To make it endian safe, all
structures that are read or written from/to disk need a swab routine to
be called after reading and before writing that structure. You also
have to consider word size differences, e.g. ix86 -> ia64 uses
different word sizes. Not a trivial task.

Google for kallsyms_i386_ia64.c. That is a hacked version of kallsyms
that runs on i386 and handles ia64 modules. Different word size, same
endianess. It is a starting point to hack a version for i386 -> ppc.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.064 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site