linux-mips
[Top] [All Lists]

Re: modutils bug? 'if' clause executes incorrectly

To: Keith Owens <kaos@melbourne.sgi.com>
Subject: Re: modutils bug? 'if' clause executes incorrectly
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Fri, 13 Oct 2000 02:23:50 +0200
Cc: Cort Dougan <cort@fsmlabs.com>, linux-mips@oss.sgi.com, linux-mips@fnet.fr
In-reply-to: <3897.971317531@kao2.melbourne.sgi.com>; from kaos@melbourne.sgi.com on Thu, Oct 12, 2000 at 01:25:31PM +1100
References: <20001011171449.A19344@bacchus.dhis.org> <3897.971317531@kao2.melbourne.sgi.com>
Sender: owner-linux-mips@oss.sgi.com
On Thu, Oct 12, 2000 at 01:25:31PM +1100, Keith Owens wrote:

> Ralf Baechle <ralf@oss.sgi.com> wrote:
> >For such occassions I would like to see some debugging functionality in
> >modutils which allows dumping the relocated disk image as it would be
> >loaded into the kernel into a disk image which then could be examined
> >with objdump etc. for potencial problems.
> 
> By the time insmod has finished with the module, the rest is a binary
> blob.  No ELF headers, no symbols, all the sections run together with a
> struct module at the start.  I can dump that easily enough but I
> question how much use it would be.  Outputing anything more complicated
> such as ELF headers and symbols would be a significant addition to
> insmod.

The blob is actually already ok and just what I wanted.  You can easily talk
objdump into disassembling that easily.  All that is required in addition
is the base address of the blob as the argument of the --adjust-vma option.

[ralf@lappi ralf]$ mips-linux-objdump -b binary -m mips --adjust-vma 0xc0000000 
-D /etc/group | head

/etc/group:     file format binary

No symbols in "/etc/group".
Disassembly of section .data:

00000000c0000000 <.data>:
    c0000000:   726f6f74        jalx    c1bdbdc8
    c0000004:   3a3a303a        xori    $s0,$s1,0x3a3a
    c0000008:   726f6f74        jalx    c1bdbdc8

  Ralf

<Prev in Thread] Current Thread [Next in Thread>