On Thu, Oct 12, 2000 at 01:25:31PM +1100, Keith Owens wrote:
> Ralf Baechle <email@example.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
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:
c0000000: 726f6f74 jalx c1bdbdc8
c0000004: 3a3a303a xori $s0,$s1,0x3a3a
c0000008: 726f6f74 jalx c1bdbdc8