lkml.org 
[lkml]   [2003]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: modutils: using kallsyms when cross-compiling kernel
Date
On 24 Jan 2003 16:51:42 -0800, 
Roland Dreier <roland@topspin.com> 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 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/

\
 
 \ /
  Last update: 2005-03-22 13:32    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site