mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Roland Dreier <roland@topspin.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: modutils: using kallsyms when cross-compiling kernel
Date: Sat, 25 Jan 2003 11:59:11 +1100	[thread overview]
Message-ID: <14412.1043456351@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "24 Jan 2003 16:51:42 -0800." <52lm1auk4h.fsf@topspin.com>

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.


  reply	other threads:[~2003-01-25  0:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-25  0:51 Roland Dreier
2003-01-25  0:59 ` Keith Owens [this message]
2003-01-25  4:06 ` Kai Germaschewski
2003-01-25  7:44   ` Keith Owens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14412.1043456351@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@topspin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®