How can I access ELF Header from FOO-dis.c

Ian Lance Taylor ian@wasabisystems.com
Mon Jan 19 14:23:00 GMT 2004


Shekhar Divekar <shekhar@cradle.com> 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.

Ian



More information about the Binutils mailing list