From: "Aashish Gupta" <aashish.tap@gmail.com>
To: "Jim Wilson" <wilson@specifix.com>
Cc: binutils@sourceware.org
Subject: Re: File not recognized in objdump!!
Date: Tue, 27 Mar 2007 09:13:00 -0000 [thread overview]
Message-ID: <2538a28f0703270024g632fea89s15cd614278ce0f7f@mail.gmail.com> (raw)
In-Reply-To: <2538a28f0703270019o6033dfd9x58641e94ae68a1f@mail.gmail.com>
Jim,
I already stepped through the fucntion "bfd_check_format_matches" and
figured out that its not recognizing the target format ... The error
looks something like this..
(gdb) run objdump
Starting program: /root/Desktop/binutils1/gas/as-new objdump
Breakpoint 6, as_perror (gripe=0x80d7638 "Selected target format '%s' unknown",
filename=0x80db2be "elf64-ia64-little") at messages.c:124
((Our target is elf64-ia64-big though ..?? and have made modification
accordingly..))
124 {
(gdb) break bfd_check_format_matches
Breakpoint 9 at 0x8088099: file format.c, line 118.
(gdb) n
126 int saved_errno = errno;
(gdb) n
128 as_show_where ();
(gdb) n
Assembler messages:
129 fprintf (stderr, gripe, filename);
(gdb) n
Selected target format 'elf64-ia64-little' unknown130 errno = saved_errno;
(gdb) n
131 errtxt = bfd_errmsg (bfd_get_error ());
(gdb) n
132 fprintf (stderr, ": %s\n", errtxt);
(gdb) n
: Invalid bfd target
133 errno = 0;
(gdb) n
135 }
(gdb) n
134 bfd_set_error (bfd_error_no_error);
(gdb)
135 }
(gdb) n
as_perror (gripe=0x80d4a34 "a.out", filename=0x0) at messages.c:134
134 bfd_set_error (bfd_error_no_error);
Thanks..
> On 3/27/07, Jim Wilson <wilson@specifix.com> wrote:
> > On Mon, 2007-03-26 at 10:44 +0530, Aashish Gupta wrote:
> > > I am trying to modify objdump to dump object file information for a
> > > ELF64 file but on a different
> > > kernel but its giving an error saying file format not recognized.
> >
> > Trying the command
> > grep "File format not recognized"
> > we find it is defined in bfd.c. Looking at this file, we see that this
> > is in an error, and an enum defined nearby shows that the array index is
> > bfd_error_file_not_recognized. So now grepping for that enum, we find
> > that there are two bfd_set_error calls in the file format.c that use it.
> > Both calls are in the function bfd_check_format_matches. Run objdump
> > under gdb, put a breakpoint here, and step through the code to see what
> > it is doing.
> > --
> > Jim Wilson, GNU Tools Support, http://www.specifix.com
> >
> >
> >
>
>
>
>
> --
> Regards,
> Aashish Gupta.
>
>
> ---------------------------------------------------
> Live life as you have no tomorrow, dream as you have eternity..!!
--
Regards,
Aashish Gupta.
---------------------------------------------------
Live life as you have no tomorrow, dream as you have eternity..!!
next prev parent reply other threads:[~2007-03-27 7:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-26 5:14 Aashish Gupta
2007-03-26 5:22 ` Aashish Gupta
2007-03-26 5:45 ` Mike Frysinger
2007-03-26 7:14 ` Aashish Gupta
2007-03-26 16:57 ` H. J. Lu
2007-03-26 20:24 ` Jim Wilson
2007-03-26 23:02 ` Jim Wilson
2007-03-26 23:20 ` Jim Wilson
[not found] ` <2538a28f0703270019o6033dfd9x58641e94ae68a1f@mail.gmail.com>
2007-03-27 9:13 ` Aashish Gupta [this message]
2007-03-30 14:51 ` Jim Wilson
2007-03-28 8:38 ` Nick Clifton
2007-03-28 9:59 ` Nick Clifton
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=2538a28f0703270024g632fea89s15cd614278ce0f7f@mail.gmail.com \
--to=aashish.tap@gmail.com \
--cc=binutils@sourceware.org \
--cc=wilson@specifix.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).