public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@specifix.com>
To: Aashish Gupta <aashish.tap@gmail.com>
Cc: binutils@sourceware.org, binutils@sources.redhat.com,
	Nick Clifton <nickc@redhat.com>
Subject: Re: File not recognized in objdump!!
Date: Mon, 26 Mar 2007 20:24:00 -0000	[thread overview]
Message-ID: <1174939416.2811.5.camel@localhost.localdomain> (raw)
In-Reply-To: <2538a28f0703252214y11a5fb55t5aab41af522580e0@mail.gmail.com>

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


WARNING: multiple messages have this Message-ID
From: Jim Wilson <wilson@specifix.com>
To: Aashish Gupta <aashish.tap@gmail.com>
Cc: binutils@sourceware.org, binutils@sources.redhat.com,
	Nick Clifton <nickc@redhat.com>
Subject: Re: File not recognized in objdump!!
Date: Mon, 26 Mar 2007 23:02:00 -0000	[thread overview]
Message-ID: <1174939416.2811.5.camel@localhost.localdomain> (raw)
Message-ID: <20070326230200.o27SkryZ6fPncA2eu8cxh1FhrnZxea315MaVxFXdegY@z> (raw)
In-Reply-To: <2538a28f0703252214y11a5fb55t5aab41af522580e0@mail.gmail.com>

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


  parent reply	other threads:[~2007-03-26 20:03 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 [this message]
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
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=1174939416.2811.5.camel@localhost.localdomain \
    --to=wilson@specifix.com \
    --cc=aashish.tap@gmail.com \
    --cc=binutils@sources.redhat.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@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).