This is the mail archive of the
mailing list for the binutils project.
Re: How can I access ELF Header from FOO-dis.c
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: shekhar at cradle dot com
- Cc: binutils at sources dot redhat dot com
- Date: 19 Jan 2004 09:23:30 -0500
- Subject: Re: How can I access ELF Header from FOO-dis.c
- References: <400B80B0.email@example.com>
Shekhar Divekar <firstname.lastname@example.org> writes:
> I am working on a port of binutils 2.14.90 to our target.
> I want use CGEN_COMPUTE_MACH macro in print_insn
> to decipher the mach for which I am disassembling.
> Also we store the arch and mach info in e_flgas of
> ELF header.
> How can I access ELF header information from
> FOO-dis.c ?
Normally a disassembler would get this information using
bfd_get_arch() and bfd_get_mach(). Other parts of BFD would arrange
to have the right information stored there.