public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Zhenyu Guo" <guozy03@mails.tsinghua.edu.cn>
To: "'Binutils'" <binutils@sources.redhat.com>
Subject: Re: Illegal instruction After base addr alterd
Date: Fri, 08 Apr 2005 03:51:00 -0000	[thread overview]
Message-ID: <000801c53bee$740c3720$0500000a@appletree> (raw)
In-Reply-To: 

Ok, I've found that the vma bits[51...60] are not implemented on
Itanium, so addr 0x5000000000000000 (0x7000000000000000 ) is invalid.
I've changed to 0x4000100000000000 this time. There is no Illegal
instruction err then.
However, I failed running the ''hello world!" again. The app seemed
asleep.
The stopped addr is 0x2000000000003c80.
Any ideas?
Thanks,
Zhenyu

-----邮件原件-----
发件人: Zhenyu Guo [mailto:guozy03@mails.tsinghua.edu.cn] 
发送时间: 2005年4月8日 11:03
收件人: 'Binutils (binutils@sources.redhat.com)'
主题: Illegal instruction After base addr alterd


Hi there,
	I'm trying to change the base addr of an application so that I
can load other usual static linked elf at the specified image base on
Itanium, say 0x400000...
	I've done the following changes in my linker script:
	/* Read-only sections, merged into text segment: */
	  . = 0x5000000000000000 + SIZEOF_HEADERS; <<-- used to be
0x4000000000000000 

	 /* Adjust the address for the data segment.  We want to adjust
up to
	     the same address within the page on the next page up.  */
  	. = 0x7000000000000000 + (. & (0x10000 - 1)); << -- used to be
0x6000000000000000 

	Then I compiled my program and executed it, got "Illegal
instruction" msg.
	And gdb told me a bit more:
		Program received signal SIGILL, Illegal instruction.
		0x2000000000003c80 in ?? ()

	And readelf told me:
Elf file type is EXEC (Executable file)
Entry point 0x50000000000004a0
There are 7 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  PHDR           0x0000000000000040 0x5000000000000040
0x5000000000000040
                 0x0000000000000188 0x0000000000000188  R E    8
  INTERP         0x00000000000001c8 0x50000000000001c8
0x50000000000001c8
                 0x0000000000000018 0x0000000000000018  R      1
      [Requesting program interpreter: /lib/ld-linux-ia64.so.2]
  LOAD           0x0000000000000000 0x5000000000000000
0x5000000000000000
                 0x0000000000000c48 0x0000000000000c48  R E    10000
  LOAD           0x0000000000000c48 0x7000000000000c48
0x7000000000000c48
                 0x0000000000000298 0x00000000000002a8  RW     10000
  DYNAMIC        0x0000000000000c58 0x7000000000000c58
0x7000000000000c58
                 0x00000000000001c0 0x00000000000001c0  RW     8
  NOTE           0x00000000000001e0 0x50000000000001e0
0x50000000000001e0
                 0x0000000000000020 0x0000000000000020  R      4
  IA_64_UNWIND   0x0000000000000bd0 0x5000000000000bd0
0x5000000000000bd0
                 0x0000000000000078 0x0000000000000078  R      8

	BTW, after gdbed this altered program, the itanium machine is
down:(
	Anybody tell me what is going on and what  I should do? Thanks,
Zhenyu

             reply	other threads:[~2005-04-08  3:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-08  3:51 Zhenyu Guo [this message]
2005-04-08  4:59 ` Ian Wienand
  -- strict thread matches above, loose matches on Subject: below --
2005-04-08  3:01 Zhenyu Guo
2005-04-08  3:44 ` James E Wilson

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='000801c53bee$740c3720$0500000a@appletree' \
    --to=guozy03@mails.tsinghua.edu.cn \
    --cc=binutils@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).