linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dan Malek <dan@mvista.com>
To: Hao Li <hli@wag.caltech.edu>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: vxhack and mvista kernel
Date: Wed, 13 Dec 2000 15:29:18 -0500	[thread overview]
Message-ID: <3A37DC1E.28164741@mvista.com> (raw)
In-Reply-To: 20001213121231.A26159@onetta.com


Hao Li wrote:

> % ./vxhack vmlinuz-sbc8260-2.4.0-test2-1.2.2-3
> Segmentation fault
>
> Could someone explain to me what the problem is?

The vxhack program has hard coded values for known sections in the
image file.  For some reason, the sections in the file have changed
since I wrote the program.

There is a loop:
	for (i=0; i<nsscns; i++) .......

in the program.  Add some code to print out the section number and
section size.  It will be obvious which section is the image, and
change the 'if (i == 5)' (or whatever the number is in the code you
have) in that loop to correspond to this number.  You can't use
objdump because the header numbers it prints do not match what you
find when you scan the file like vxhack does.

If you want to update the program to read the string/symbol tables
and to automatically locate sections by name, it would be useful.
This was just a quick five minute program to solve an immediate problem,
not something worth useful time.


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2000-12-13 20:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-13 20:12 vxhack and mvista kernel Hao Li
2000-12-13 20:29 ` Dan Malek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-12-14 16:40 Huy Vu

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=3A37DC1E.28164741@mvista.com \
    --to=dan@mvista.com \
    --cc=hli@wag.caltech.edu \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /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;
as well as URLs for NNTP newsgroup(s).